TCMALLOC memory leak

974 Views Asked by At

On Windows when I static bind tcmalloc with my code, I see continuous memory growth, but there is no growth if I do not use tcmalloc.

issue is not present in Linux.

I have tried flags below flags:

TCMALLOC_RELEASE_RATE = 25
TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES = 1
TCMALLOC_AGRESSIVE_DECOMMIT = t

I could see that the memory growth rate is slow when I use these variables, but over multiple days memory still keeps on growing.

I need to stop memory growth.

1

There are 1 best solutions below

1
On

gperftools on windows does support returning memory back to OS. And it should work out of the box. So you've likely discovered some bug. Or maybe there is some misunderstanding. Please file ticket on github.com/gperftools/gperftools. Ideally, with small program that we can use to reproduce it.