X
4555

Windows XP, Windows 7 Task Manager and IDL report different amounts of memory usage


Why do the Windows XP/ 7 Task Manager and IDL report different amounts of memory usage for IDL?

There are two ways to monitor IDL’s memory usage on a Windows NT/2000/XP machine. One way is to use the Task Manager. The Task Manager is accessed by doing Crl+Alt+Del. Select the Performance tab. The Task Manager reports the total amount of physical memory available, and the amount of memory in use. But the Task Manager is reporting the total amount of memory allocated, and does not discriminate between memory in use, and memory on the free list.

The other way is to type HELP, /MEMORY at the IDL command line. Using HELP, /MEMORY reports the amount of dynamic memory (in bytes) currently in use by the IDL session, and the number of times memory as been allocated and deallocated. The amount of memory used reported by HELP, /MEMORY does not include the amount of memory that resides on the free list.

As variables are created memory is allocated from virtual memory. After memory is deallocated it is not returned to the operating system, but placed on the free list. Memory used in an IDL session can never shrink; it can only increase.

The next time a memory allocation routine is called, it will try to satisfy the request from this free list before it asks the operating system for more memory. Therefore if the demand for memory can be satisfied from the free list virtual memory is not allocated. Thus, the process size (and demand on the pagefile) represents the high water mark of memory usage, not its current usage.



Related articles:
  • Windows Memory Allocation Limitations

  • How does IDL release Virtual Memory?