custom allocators Re:pool_alloc

17 Mar
2010
17 Mar
'10
10:13 a.m.
I am not understanding the use of pool with std::set. i.e. the release_memory() function referenced in last example shown on: http://www.boost.org/doc/libs/1_42_0/libs/pool/doc/interfaces.html seems to do nothing. I call GetProcessMemoryInfo() and don't see any change after the set has gone out of scope. maybe someone could relate what happens when set goes out of scope and release_memory() isn't called versus set goes out of scope and release_memory() is called. I want to do something like: 1.std::set<unsigned int, std::less<unsigned int>, boost::pool_allocator<unsigned int>> v; 2. for(int i=0; i<(K); i++) { v.insert(i); } 3. use v 4. release_memory() on v //dump all set elements in one action 5. repeat 1-4 with a new set
5561
Age (days ago)
5561
Last active (days ago)
0 comments
1 participants
participants (1)
-
B Hart