Discussion:
Private Bytes, NonPagedPool and Paged Pool Bytes
(too old to reply)
garyolsen
2003-11-18 18:45:29 UTC
Permalink
What are Private Bytes, NonPagedPool, Paged Pool Bytes? How are thry
related to memory leak?

What tools are most popularly used for detecting potential memory leak?

Thanks!
Scott McPhillips [MVP]
2003-11-18 23:56:52 UTC
Permalink
Post by garyolsen
What are Private Bytes, NonPagedPool, Paged Pool Bytes? How are thry
related to memory leak?
What tools are most popularly used for detecting potential memory leak?
Thanks!
All memory available to application programs is from the paged pool.
It's the same thing as virtual memory. It means the operating system is
free to swap this memory to disk when necessary.

The nonpaged pool is permanently allocated, never swapped to disk. It
is used by some parts of the operating system and device drivers. You
can't have any of it unless you write a device driver.

Don't know about "private bytes."

A memory leak will cause your application to acquire more and more
virtual memory over time, evenually running out (2 GBytes). You can
best observe this externally by watching the "working set" of the
application in Performance Monitor. Visual C++ has pretty useful
capabilities to detect memory leaks. See _CrtDumpMemoryLeaks and
related functions. In MFC applications this monitoring is done
automatically and it reports all memory leaks in the debugger when the
application is closed.
--
Scott McPhillips [VC++ MVP]
Alex Fedotov
2003-11-19 20:35:17 UTC
Permalink
Post by Scott McPhillips [MVP]
Don't know about "private bytes."
Private bytes (in PerfMon terminology) are bytes in the address space of a
process that cannot be shared with other processes. Stacks, heaps and
writable data sections usually provide for private bytes.

In contrast, shared bytes are bytes that are shared, or can potentially be
shared, with other processes. Code and read-only data sections are common
examples of shared bytes.

-- Alex Fedotov
Stephen Kellett
2003-11-20 01:35:27 UTC
Permalink
In message
Post by garyolsen
What are Private Bytes, NonPagedPool, Paged Pool Bytes? How are thry
related to memory leak?
Typically a memory leak will not be in your shared memory bytes, it will
be in your private bytes.
Post by garyolsen
What tools are most popularly used for detecting potential memory leak?
There are a variety of free and commercial tools available. Type "memory
leak" into Google and see what you get.

The free tools have varying ability and usually limited support. The
commercial tools tend to offer more features. Some commercial tools
require expensive maintenance contracts for support, others do not.

Memory Validator is a commercial tool that provides more features (and
thus more benefits) than any competing tool and customer support with no
cost (you only pay for the software license).

http://www.softwareverify.com

Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk
RSI Information: http://www.objmedia.demon.co.uk/rsi.html
Loading...