Tuesday, January 29, 2013

Analyze memory fragmentation with VMMap

VMMap is a process virtual and physical memory analysis utility. It shows 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

 

If you have an application that runs out of memory and you only see 800MB of memory used you probably have fragmentation problems. You can use VMMap to see how the memory is allocated. If you use VirtualAlloc for less than 64 KB you will generate unusable memory regions. This is because the address must be aligned to 64KB. By allocating 10 chunks of 1KB you will have 10KB of used memory and 630KB of unusable memory. If you have 32-bit application you may run out of memory (you only have 2 GB of virtual address space available).

References:
http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx

No comments:

Post a Comment