0

I feel like I must be asking a stupid question. I want to see what's taking up all the RAM in my program, which runs at about 1.4gb of RAM usage. However, the visual studio memory usage tool only looks at my heap, which is about 116mb. How can I debug my RAM usage properly?

Here is a screenshot of my total heap size: enter image description here

Edit: I've found a question that probably answers mine. Why the "View Heap" result does not match with 'Process Memory Usage' in Visual Studio

Figwig
  • 592
  • 1
  • 3
  • 16
  • Stack in Windows usually caps out at 1 MB. No damn way it's soaking up 1.4 GB unless you have a lot of of threads, each with their own stack. What are you using to measure your memory usage? – user4581301 Apr 01 '20 at 16:11
  • I must be misunderstanding stack then. Task manager, Visual Studio's memory usage graph, and `GlobalMemoryStatusEx` calls all return that I'm using around 1.4GB of RAM. However, my heap size is much less. I've added a screenshot to my question – Figwig Apr 01 '20 at 16:16
  • I've edited out the stack references in my question to better reflect the problem - now that you've taught me that about stacks :) – Figwig Apr 01 '20 at 16:19
  • Memory usage reporting is complicated and the results are often hard to interpret. Task manager isn't that bright in its default views. Take a look at [Process Explorer](https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer) to get a better breakdown. `GlobalMemoryStatusEx ` tells you information about the system, not about your program. Your program might not be the pig. It could be Visual Studio's debugger scaffolding, a few Browser windows, or a torrent downloading in the background. – user4581301 Apr 01 '20 at 16:32

0 Answers0