开发者

Understanding .NET Application Memory Size

开发者 https://www.devze.com 2023-03-17 15:34 出处:网络
An application I\'m working on takes 338MB private bytes and 780MB virtual bytes right after startup.

An application I'm working on takes 338MB private bytes and 780MB virtual bytes right after startup. I'm trying to understand what takes all this memory. Hopefully a开发者_如何学Gofter understanding that I'll be able to reduce it's size. This is a 32bit C# application, numbers above were taken while it is running in Windows7 64bit.

Opening a dump with windbg shows that the heap size is 47MB. The total external library files size that the application is loading is 60MB.

An empty c# application takes only 10MB so what can cause my application to reach 338MB private bytes? And why windows7 allocates 780MB virtual memory?

Any directions will help.


You can utilize VMMap, a process virtual and physical memory analysis utility from Windows Sysinternals on the technet site.

VMMapshows a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.

Besides flexible views for analyzing live processes, VMMap supports the export of data in multiple forms, including a native format that preserves all the information so that you can load back in. It also includes command-line options that enable scripting scenarios.

VMMap is the ideal tool for developers wanting to understand and optimize their application's memory resource usage.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号