Understanding .NET application memory space

The application I'm working on takes up 338 MB of private bytes and 780 MB of virtual bytes right after launch. I am trying to understand what takes all this memory. I hope I understand that I can reduce its size. This is a 32-bit C # application, the numbers indicated above were executed while working on the 64-bit version of Windows7.

Opening a dump with windbg shows that the heap size is 47 MB. The total file size of external libraries downloaded by the application is 60 MB.

An empty C # application takes up only 10 MB, and what could cause my application to reach 338 MB of private bytes? And why does Windows7 allocate 780 MB virtual memory?

Any directions will help.

+6
source share
1 answer

You can use VMMap , a utility for analyzing the virtual and physical memory of a process from Windows Sysinternals at technet.

VMMap shows a breakdown of the processes associated with virtual memory, as well as the amount of physical memory (working set) assigned by the operating system to these types. In addition to graphical representations of memory usage, VMMap also displays summary information and a detailed process memory map. Powerful filtering and updating functions identify the sources of process memory usage and the cost of memory for application functions.

In addition to flexible views for analyzing live processes, VMMap supports exporting data in several forms, including its own format, which saves all the information so that you can load again. It also includes command line options that allow scripting scripts.

VMMap is an ideal tool for developers who want to understand and optimize the use of application memory resources .

+5
source

Source: https://habr.com/ru/post/891941/


All Articles