What does "TCMalloc does not currently return any memory to the system"?

At http://goog-perftools.sourceforge.net/doc/tcmalloc.html states: "CMalloc does not currently return any memory to the system." I guess this means that if I allocated 42 MB and freed it, the system would not return it, but the next time I typed 47 MB, it would only steal 5 MB more? My question is what happens with loaded dll or .so modules. Do they get their piece of memory, which will not be released until the program is released. I ask, because if I want to write runtime updated by sw, I have to load new dlls without exiting the program. So my question is: if I use -ltcmalloc and I constantly load and unload dlls that allocate and free memory, will this lead to memory explosion in mem? I assume this is a stupid question, but I don't know if each dll uses its own material to allocate memory,or if memory allocation is included at each level of the process.

+3
source share
1 answer

Memory refers to a process, not a DLL. Thus, the memory is usually held until the process is complete. This is a common feature of most malloc implementations, not just the one you are asking for.

+3
source

All Articles