Even after clear, seems to be memory is not cleaned up when I use
boost::fast_pool_allocator. Can someone help in correct usage?
typedef std::set<unsigned
int, std::less<
unsigned int>, boost::fast_pool_allocator<
unsigned int>
> IDSET;
int main()
{
IDSET set;
WriteMemoryUsage();
for (int i=0;i<1000000;i++)
set.insert(i);
WriteMemoryUsage();
set.clear();
WriteMemoryUsage();
return 1;
}
In WriteMemoryUsage
Processid: 4836
Peak Memory used: 1155072
Working Set Size: 2744320
Page File Usage: 1155072
Processid: 4836
Peak Memory used: 34816000
Working Set Size: 36528128
Page File Usage: 34816000
Processid: 4836
Peak Memory used: 34816000
Working Set Size: 36532224
Page File Usage: 34816000
Regards,
UJ