What are the best open source memory pools available in c++? I do not want thread safety as application will be single threaded. I primary goal is fast allocation and de-allocation. Bit of more than required memory usage is allowed and more initialization time is ok.
In detail, when i say obj = pool.alloc()
, I should get the memory for Object
from pool<Object>
memory as fast as possible. When I say pool.free(obj)
, memory pointed by obj
(which belongs to pool) must be freed immediately and return the memory to object pool. These operations should not involve any locks. Internally, pool could take bit more memory to manage Objects
free/allocated instanaces.