C# memory usage -


How can I get real memory in my C # application?

  • Shows different metrics.
  • Indicates the growing use of private bytes.
  • The display counter (perfmon.msc) showed different metrics
  • When I used the .NET Memory Profiler, it has been shown that most of the storage trash is collected and only There are some live bytes.
  • I do not know who to believe in.

    Memory usage is a bit more complicated than displaying a number or two. I suggest that you have different Take a look at the type of counter

    .NET only makes the case even more complex A .NET process is just another Windows process, so obviously there will be all regular metrics in it, but additionally CLR works as a memory manager for managed applications. Therefore, depending on the point of view, these numbers will be different.

    CLR allocates virtual memory effectively in large part from NTT and gives virtual memory and then removes the bits of memory as needed. So when your app can use a little bit of memory at some point in time, this memory can be released on the OS or not.

    CLR uses memory to load IL itself, compiles IL in local code, stores all types of information and even further. It all adds to the memory footprint of the process.

    If you want to know how much storage your managed application uses, then byte of all stacks is useful. Private bytes can be used as a little estimate for memory usage of the application at the process level.

    You can also look at these related questions:


    Comments