Pool allocator

Back to Memory allocators

The PoolAllocator is a memory allocator for memory regions of uniform size. This allows for minimal book-keeping and very fast allocation and deallocation. The basic approach is based on allocating big blocks of memory which is then shared as required. PoolAllocator is conservative in memory allocation: no new memory is allocated until all existing memory is used.

Acknowledgements

I first saw the idea of embedding the linked list inside the memory block in the book Modern C++ Design by Andrei Alexandrescu. He discusses the implementation of a similar memory allocator.

References

Modern C++ Design, Andrei Alexandrescu, 2001.

Learn more

Files

Pool allocator

A uniform-sized memory allocator

Pool allocator module

Testing for PoolAllocator