A simple & high performance object pool using modern C++
Go to file
2024-03-01 14:21:52 -05:00
.idea allocPool: First commit 2024-03-01 14:21:52 -05:00
.clang-format allocPool: First commit 2024-03-01 14:21:52 -05:00
allocPool.cpp allocPool: First commit 2024-03-01 14:21:52 -05:00
allocPool.hpp allocPool: First commit 2024-03-01 14:21:52 -05:00
CMakeLists.txt allocPool: First commit 2024-03-01 14:21:52 -05:00
main.cpp allocPool: First commit 2024-03-01 14:21:52 -05:00
README.md allocPool: First commit 2024-03-01 14:21:52 -05:00

allocPool - A simple & high performance object pool using modern C++

This is allocPool, a pool of objects that allow you to avoid expensive allocations during runtime. This preallocates objects in the constructor (with threads) then offers you two functions: getPtr() and returnPtr(ptr).

Using C++ concepts, we can use templates and require the class given to have a default constructor and to have a .reset() function. It will be used to clean the objects before giving them to another caller.

This pool uses a hashmap and a pivot to make returnPtr(ptr) extremely fast.

It will automatically grow when the max capacity is reached.