NormalPagePriority vs NormalPoolPriority

What is the difference between these two priority macros, where does these priority flags should be used. Can we use NormalPagePriority along with NdisAllocateMemoryWithTagPriority function call in allocating the memory.

On Mar 5, 2017, at 8:51 PM, xxxxx@gmail.com wrote:

What is the difference between these two priority macros, where does these priority flags should be used. Can we use NormalPagePriority along with NdisAllocateMemoryWithTagPriority function call in allocating the memory.

Have you looked at the documentation? NdisAllocateMemoryWithTagPriority is a wrapper around ExAllocatePoolWithTagPriority, which uses the XxxPoolPriority values. The XxxxPagePriority values are used with memory manager APIs, like MmGetSystemAddressForMdlSafe.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thank You for the response Tim.

I looked at the documentation and as you mentioned it has different usage with respect to the API we have. When I look at the Value defined, both have value defined as 16.

When using NormalPagePriority, Does it allocated memory from paged pool?, as I was having random BSOD that says “Driver is attempting to access pageable memory at IRQL that was too high.”

MSDN says NdisAllocateMemoryWithTagPriority allocates memory from non-paged pool. Is there memory allocation functions that allocates from paged pool of memory.

Appreciate your help.

>When using NormalPagePriority, Does it allocated memory from paged pool?,

as I was having random BSOD that says “Driver is attempting to >access
pageable memory at IRQL that was too high.”

It always allocated non-paged pool.

Post your !analyze -v output and someone might be able to point you in the
right direction.

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Thank You for the response Tim.

I looked at the documentation and as you mentioned it has different usage
with respect to the API we have. When I look at the Value defined, both have
value defined as 16.

When using NormalPagePriority, Does it allocated memory from paged pool?, as
I was having random BSOD that says “Driver is attempting to access pageable
memory at IRQL that was too high.”

MSDN says NdisAllocateMemoryWithTagPriority allocates memory from non-paged
pool. Is there memory allocation functions that allocates from paged pool of
memory.

Appreciate your help.

You don’t USE NormalPagePriority with NdisAllocateMemoryWIthTagPriority.

You use NormalPoolPriority instead.

Now… yes… they both coincidentally, today, may have the same value.

(Gad! If there ever was an argument for using “enum class” it’s with these kinds of flags)

Peter
OSR
@OSRDrivers

xxxxx@gmail.com wrote:

I looked at the documentation and as you mentioned it has different usage with respect to the API we have. When I look at the Value defined, both have value defined as 16.

Which, of course, means that the spelling is irrelevant as far as the
APIs are concerned. You could specify 8+8 and it would have the same
meaning.

When using NormalPagePriority, Does it allocated memory from paged pool?, as I was having random BSOD that says “Driver is attempting to access pageable memory at IRQL that was too high.”

Are you running with Driver Verifier? If you are misusing paged pool in
some way, that usually points it out relatively quickly.

MSDN says NdisAllocateMemoryWithTagPriority allocates memory from non-paged pool. Is there memory allocation functions that allocates from paged pool of memory.

Yes, you can call ExAllocatePool and specify PagedPool.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.