I’ve been spending the past week off and on working on a cross platform memory manager. I’ve learned a lot since I haven’t ever gotten this deep into memory before on any of the products I’ve worked on. This time, since it’s my own products, I’m writing all the framework, library, and graphical code from scratch. Definitely recommend everyone do this at least once in your career so you know why you normally leave it to others
The memory code has been both a challenge and bunch of fun. So far it will support multiple memory heaps, each with allocation tracking and the ability to dump their info at any point. The last bit, and the trickiest, is to write the allocator that I’m going to use. I’ll probably end up with a few of them since this code is meant to run on Windows, Xbox and PSP.
I’ve been trying to make sure things are abstracted in a clean way but also set up to be the fastest. Avoiding virtual functions and inheritance in this code. I’ll just compile in the platform specific files instead.
Also, put together my debug text output and assert handlers together as well.