google / tcmalloc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disabling tcmalloc cache

coder-saab001 opened this issue · comments

Hi community, is there is some way to disable the tcmalloc cache totally. We are working on minimising the memory usage of our system.

I doubt that any answer given here will differ substantially from the answer given on gperftools/gperftools#1466.

@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.