Disabling tcmalloc cache
coder-saab001 opened this issue · comments
Ishant Goyal commented
Hi community, is there is some way to disable the tcmalloc cache totally. We are working on minimising the memory usage of our system.
Paul Wankadia commented
I doubt that any answer given here will differ substantially from the answer given on gperftools/gperftools#1466.
Chris Kennelly commented
@junyer is correct. The caches hold onto freed objects by design, since they will likely be reused in the future.
TCMalloc has a number of heuristics to find unnecessary objects and flush them, but all of these are designed with a balance for CPU and RAM usage.