Peter
Peter

Reputation: 45

VS Performance Profiler - Memory Usage snapshot contain only ~20% of total Private Bytes memory

I'm analyzing memory overhead of my C++ application. I collected a Memory Usage snapshot using Visual Studio 2019 Performance Profiler. However the snapshots contain only ~20% of memory of what is reported as Private Bytes in Diagnostics tab (or Process Explorer app).

I suspect some of the unaccounted memory is stack based memory which the heap captures wouldn't cover but I'd expect its size to be miniscule amount in comparison to heap right? The system has plenty of free RAM left (100+ GB), so I don't expect 80% of Private Bytes being in pagefile, in case the Memory Usage snapshot wouldn't capture that? Any suggestions how to understand where all the memory is (i.e. how much of it is stack based memory, etc) and or how to get a capture of it all with corresponding stacks?

Snapshot_vs_Diagnostics_Sizes - two captures of the app with two different usage amounts

Upvotes: 0

Views: 454

Answers (1)

Peter
Peter

Reputation: 45

Windows Performance Recorder trace with Heap + VirtualAlloc option gives a trace with stacks for all the memory and solves my issue.

Upvotes: 1

Related Questions