Nonpaged Pool Memory Allocation

The OS I was testing with was Windows Server 2003 x32 with 2.5 GB of RAM.

I was testing paged/nonpaged pool leaks, and I was curious about how the memory manager handles allocations and commits after the startup initialization. It looks like it allocates about 120 MB to the nonpaged pool upon startup (in this example for this server), and then begins doing memory commits to the kernel address space – but when nonpaged pool requests increase past that amount, it will begin to allocate only the exact amount that is being requested and nothing more.

The initial kernel memory state:

Notice the available RAM is 2,277K, and the nonpaged pool is 10.2K.

After leaking the nonpaged pool to about 125K, it began to allocate more free RAM for use with the nonpaged pool:

Notice now the available RAM is now 2,261K, and the nonpaged pool is 145K.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: