VMem Features

Integrates quickly and easily into any C++ codebase.
Quick and Easy Integration
Very fast and efficient under high contention.
Fast Multi-threaded Allocation
Integrates quickly and easily into any C++ codebase.

Integrates quickly and easily into any C++ codebase.

VMem can integrate into any C++ codebase in minutes. Simply override new and delete at a global level and call the VMem Alloc and Free functions. Alternatively you can define OVERRIDE_NEW_DELETE and let VMem do this automatically.

VMem has 5 debug levels, 0 - 5. Debug level 0 is for retail builds. At the debug level increases so does the overhead. By default debug builds are set to debug level 2. Debug levels 3 and 4 are useful for tracking down memory corruptions.

VMem supports creation of multiple heaps. This ca be useful for partitioning different systems into their own address space to avoid contention and fragmentation. Use CreateHeap and DestroyHeap for creating and destroying heaps. VMem also supports physical heaps for graphics memory.

<strong>Integrates quickly and easily into any C++ codebase.</strong><br /><br />
Very fast and efficient under high contention.

Very fast and efficient under high contention.

Modern applications are often highly threaded and allocation can become a bottleneck. VMem has a number of features which mitigate this problem. The first is multi-level locking. Instead of a single lock around the entire allocator, each allocator has its own lock which avoids a lot of contention. Deeper systems inside VMem which are shared by allocators also have their own locks.

Each allocator in VMem has a cache. When an allocation is freed the allocation is stored in the cache for fast re-use instead of being returned to the system. Threads often allocate and free allocations of similar sizes and the caches ensure that this pattern is as fast as possible. Allocations often are little more than a simple Compare-And-Swap instruction.