Process memory grows much faster with gflags + ust

I had a problem with gflags while trying to find memory leaks in a windows application.

When I turn on the ust flag (to collect traces of the memory stack), the memory of my application increases much faster than when I turn off the flag (it reaches 800 MB in 10 minutes, which is far from 50-100 MB / day, which I get when the flag is off )

I read that there is a maximum for 32 MB stack traces, so I suppose this should not be a problem.

The computer is a 4-processor Intelยฎ Xeon (R) E5410 @ 2.33 GHz processor.

If someone can give me some hint, I would really appreciate it.

Thanks!

+3
source share
2 answers

The stack trace database is not the only impact of the ust flag. It also adds at least 32 bytes to each allocation to preserve its stack trace identifier. This may explain the increase in your memory if many small allocations are involved. If you started the process with an attached debugger or compiled the process for debugging purposes, the window heaps will be installed in debug mode, and the distribution overhead will be even greater.

+3
source

You can set the maximum size of the trace database using / tracedb SizeInMB See the MSDN Gflags documentation for the chapter and verse. By default, there is no maximum size, which most likely explains what you saw in bahaviour.

+1
source

All Articles