Memory Leaks are Fun

Well, I had a pretty uninteresting weekend on engine progress. Effectively, I haven’t made any real progress on the engine part. I mostly spent time tracking down and fixing bugs. I fixed a very egregious error in my HashMap code when removing elements. I was trying to get smart and try not to rebuild the entire HashMap when removing an element, but it was failing in certain cases. I have resorted, for now, to do the brute force HashMap rebuild methodology.

I also spent some time adding features to my memory allocator. Specifically, the ability to optionally compile in stack traces on allocation. Basically, when you allocate memory, it will also capture the call stack. If you are leaking memory when the program terminates, it will write the call stacks to a log file. Nothing you can’t solve with Visual Leak Detector, but when you don’t have the ability to attach a debugger, better than nothing. Ideally, I’d like to implement my own version of Heap Inspector (I know it says the site might be malware, but I have heard from a few colleagues that Heap Inspector is legit) to replace the stack trace method. I did attempt to integrate Heap Inspector¬†into Shibboleth, but it didn’t play well with my heavy usage of DLLs.

So, yeah, that pretty much sums up the weekend and then some. I’m going to be spending this next week attempting to fix some memory leaks caused by using my resource loading system to load more than two resources! So that’s going to be fun … Until next time!