Load Testing Controllers
Load Testing Controllers
The procedure for finding a memory leak depends on what type of virtual
memory is being allocated. The bug may be local to an application so that its
only effect is on the process virtual address space where the leak is
occurring. The bug may be in a shared DLL or other common module so that
the bug will be manifest first in this application and then that one. Finally,
the problem could be a leak affecting shared system memory, which can
make it very difficult to pinpoint the specific application or module causing
the leak. To diagnose a memory leak, be prepared to look at any or all of the
following:
Pool Paged Bytes. Virtual memory for various system functions, including
shared memory files (like DLLs), is allocated from the Paged Pool, which is an
area of the system's virtual memory that is limited in size. A program with a
memory leak that is allocating, but never freeing memory from the Paged
Pool will eventually exhaust the Paged Pool. Subsequent allocations that
request the Paged Pool will then fail, with unpredictable (but predictably bad)
results. The Pool Paged Bytes Counter in the Memory Object reports the
current number of bytes allocated from the Paged Pool. The upper limit on
the size of the Paged Pool is calculated by the system at start-up. This
calculation can be overridden by setting the Paged Pool Limit explicitly using
the Registry parameter PagedPoolSize at
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management. In either case, the upper limit on the size of the Paged Pool,
according to Microsoft documentation in Windows 2000 Resource Kit is 192
MB in NT 4.0 and up to 470 MB in Windows 2000.
Pool Nonpaged Bytes. Some kernel functions and device drivers in particular
require real memory buffers that can never be paged out of the system.
These programs allocate memory from the nonpaged pool, which also has an
upper limit. (The upper limit on the size of the nonpaged pool in Windows NT
is 128 MB and 256 MB in Windows 2000.) A device driver with a memory leak
will eventually exhaust the supply of Nonpaged Pool Bytes, which will cause
subsequent allocations that request the nonpaged pool to fail. Running out of
space in the nonpaged pool often results in a Blue Screen
Available Bytes