I want to make my own malloc/free so I can make a precise copying allocator.
Any gurus have any tips and suggestions?
I have a few questions for now:
- Should I just malloc large chunks of memory, and then distribute from that so I don't have to call the system calls?
- How are copying collectors usually done? I would imagine that this part is a bit complicated to do efficiently. My naive implementation would just malloc a block the size of the remaining objects which would require 2x the space.