
Seweryn Habdank-Wojewódzki ha escrito:
Hi!
Can any one show me the proper example of usage of pool allocator.
I have two examples (code below) and usage of pool consumes a lot of memory, and nothing is faster/better/etc.
So what should be a design goal for using pool allocator?
Kind regards.
[...] Hi Seweryn, I haven't tested your code, but I noticed that you're using boost::fast_pool_allocator inside std::vectors: AFAIK, pool allocators can do little to improve the performance of vectors, since these data structures already have their elements arranged in contiguous chunks of memory. If you switched to a node-based container like vg. std::list I guess you would actually see some improvement when using the pool allocator. Just my 2c, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo