When to use paged and non-paged memory pool

Hi ,

Can some body tell me on what bases we need to decide to go for paged pool or non paged memory pool.

What are the basic criteria behind choosing the Memory pools while allocating the memory?

Thanks,
Jagadish

The most basic criteria is IRQL that memory may be accessed at - if you have to access memory at
IRQL>=DISPATCH_LEVEL, you just have no option, other than allocating it from non-paged pool (please note that most of your driver’s Dispatch routines may get called at DPC level).

However, non-paged pool is relatively scarce resource. Therefore, if you know for sure that your code is not going to access memory at elevated IRQL, it is better not to waste a precious resource, and, instead, make an allocation from the paged pool

Anton Bassov

If you will ever need to touch the memory from >= DISPATCH_LEVEL - then it
must be nonpaged.

Such an IRQL can arise, among other things, due to spinlock acquisition.
So, any memory protected by spinlocks must be nonpaged.

In other cases, use paged memory and FAST_MUTEX as a lock.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi ,
>
> Can some body tell me on what bases we need to decide to go for paged pool or
non paged memory pool.
>
> What are the basic criteria behind choosing the Memory pools while allocating
the memory?
>
>
> Thanks,
> Jagadish
>
>
>
>
>