Repository navigation
CPPShift MemoryPool
The header & code files for adding the memory pool to your project.
Features:
- Create a memory pool:
CPPShift::Memory::MemoryPool * mp = CPPShift::Memory::MemoryPoolManager::create(size); - Allocate in pool using new:
Type* my_type = new (mp) Type[size]; - Smart de-allocate & re-allocate memory in the pool:
CPPShift::Memory::MemoryPoolManager::free(my_type)&CPPShift::Memory::MemoryPoolManager::reallocate(my_type, new_size)respectively. - Scope allocations together to free them together:
CPPShift::Memory::MemoryPoolManager::startScope(mp)&CPPShift::Memory::MemoryPoolManager::endScope(mp) - Smart freeing of memory blocks for you while hiding implementation details
- Very fast solution for allocations of different sizes & types