Compiling a custom malloc

后端 未结 3 1034
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 23:31

I have written a custom library which implements malloc/calloc/realloc/free using the standard C prototypes, and I figured out how to compile it to an so. I want to test the

3条回答
  •  感动是毒
    2021-01-12 23:59

    Don't write your malloc() in terms of malloc() -- write it using sbrk, which gets memory directly from the OS.

提交回复
热议问题