0

How would I go about making my very own malloc implementation in assembler (NASM, to be specific)? Google has been inconclusive on a malloc workaround. mmap has something to do with files (according to it's manual) and brk expands the space pointers refer to (I think), though I don't have a pointer in the first place. Clarity would be much appreciated.

I'm using NASM on x64 Linux

Thanks for the help.

R-Rothrock
  • 303
  • 2
  • 14
  • Does this answer your question? [In malloc, why use brk at all? Why not just use mmap?](https://stackoverflow.com/questions/55768549/in-malloc-why-use-brk-at-all-why-not-just-use-mmap) – stark Jun 28 '23 at 15:23
  • I would start with studying existing `malloc` implementations. – n. m. could be an AI Jun 28 '23 at 16:47

0 Answers0