Hi guys, Does anyone know how to release all the memory allocated by STL? Just let me say why I want to do this. The software I am working on uses STL a lot in its first phase. I allocate nearly a 1GB of memory in a lot of different STL containers. In the second phase of the software, I clear() all these container and start a custom algorithm that also uses a lot of memory. But the STL memory pool is holding quite a lot of memory, and I run out of memory in the middle of the algorithm. If I run the two phases of the software in different binaries, everything is ok and my algorithm fits in memory. There are no leaks that I am aware of in the software (I've already made a lot of valgrind checks). I do not want to use -D__USE_MALLOC or GLIBCPP_FORCE_NEW=1, since I do want the performance of the STL memory pool. I just want to release this pool during one of the phases of my software. Thanks in advance, Davi de Castro Reis
participants (1)
-
Davi de Castro Reis