Re: multimap.clear() does not free its memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Budge wrote:
The default allocator for the standard library (STL) stuff is
implementation dependent.  That means it won't necessarily use the
same memory pool as operator new.  Moreover, even within any given
pool, depending on the implementation, the implementor might decide to
allocate memory for different scenarios.

You'd probably have reasonable luck
allocating/deleting/allocating/deleting with operator new and/or the
stl's allocator, but not necessarily when you mix the two.

But my problem now is that in some application I'm creating a 'temporary' std::multimap which takes about 500MB. But now I want to make sure the application is going to reuse this memory later during the lifetime of the app (but not necessarily for stl objects) because otherwise it might run out of memory.


toon

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux