Thread-Safe Memory Manager

I developed a simple memory manager further outside of class into a thread-safe memory manager that I now use in my multithreaded engine which supports Quake III BSP loading and a custom Character Animation System.

The primary motivation for the memory manager is to control the allocation of memory to increase locality of references. The memory manager allocates a large block of memory which is then used for all the engine’s memory allocations for increased spatial locality. The engine features recycled object pools within various components to increase temporal locality. Separate threads are used for resource buffering and rendering which perform all heap allocations through the memory manager. In addition, memory usage statistics are tracked and leaks are reported to Visual Studio’s output window.

Source Code