I am using Fedora 9, gcc 4.3.0, and boost 1.38.0. I am inheriting from object_pool so I have access to some of object_pool's hidden members. Is there a way for me to find out how many memory blocks or allocated chunks there are in the free list vs how many chunks are currently being used? Is the object_pool thread safe? Does set_next_size have a permanent effect or will the double algorithm start being used after the next allocation? If it's a permanent effect, is there something I can call to start using the double algorithm again? Thanks
Pearl Rothman wrote:
I am using Fedora 9, gcc 4.3.0, and boost 1.38.0.
I am inheriting from object_pool so I have access to some of object_pool's hidden members.
Is there a way for me to find out how many memory blocks or allocated chunks there are in the free list vs how many chunks are currently being used?
The protected interface is documented at
http://www.boost.org/doc/libs/1_38_0/libs/pool/doc/implementation/pool.html
To get all allocated blocks, you may iterate over
details::PODptr
Is the object_pool thread safe?
singleton_pool and pool_alloc are thread safe, while object_pool is not.
Does set_next_size have a permanent effect or will the double algorithm start being used after the next allocation? If it's a permanent effect, is there something I can call to start using the double algorithm again? I am not sure, but you may write a simple test program via next_size and set_next_size to check how set_next_size behaves.
Tobias
Thanks _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Pearl Rothman
-
Tobias Columbus