(N)PAGED_LOOKASIDE_LIST vs ExAllocatePoolWithTag

Hi All,
What is the advantage/disadvantage of (N)PAGED_LOOKASIDE_LIST vs ExAllocatePoolWithTag.
Where to use which one.

I am recently getting a BSOD on copying data from source to destination, where both source and destination seems valid.

Currently i’m using ExAllocatePoolWithTag(), with mostly NonPagedPool for data structure and list i’ve in my file system driver.

>What is the advantage/disadvantage of (N)PAGED_LOOKASIDE_LIST vs

ExAllocatePoolWithTag.
Where to use which one.

The documentation covers the usage of lookaside lists:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff565416(v=vs.85).aspx

I am recently getting a BSOD on copying data from source to destination,
where both source and destination seems >valid.

Using a lookaside list isn’t going to help you, you have a bug in your code
(in fact, using a lookaside list might mask the bug further). Have you
enabled Driver Verifier? Also, for help with bug checks you need to post the
!analyze -v output from the debugger.

-scott

wrote in message news:xxxxx@ntfsd…

Hi All,
What is the advantage/disadvantage of (N)PAGED_LOOKASIDE_LIST vs
ExAllocatePoolWithTag.
Where to use which one.

I am recently getting a BSOD on copying data from source to destination,
where both source and destination seems valid.

Currently i’m using ExAllocatePoolWithTag(), with mostly NonPagedPool for
data structure and list i’ve in my file system driver.

> Hi All,

What is the advantage/disadvantage of (N)PAGED_LOOKASIDE_LIST vs
ExAllocatePoolWithTag.
Where to use which one.

If you have blocks of a fixed size which are frequently allocated and
deallocated, use a lookaside list. If you don’t know how big the blocks
are, you are stuck with the general allocation calls.

I am recently getting a BSOD on copying data from source to destination,
where both source and destination seems valid.

Well, they may “seem” valid but it is clear that they are not. We would
need to see what kind of BSOD you are getting to conjecture beyond that.
There are hundreds of possible answers.

Currently i’m using ExAllocatePoolWithTag(), with mostly NonPagedPool for
data structure and list i’ve in my file system driver.

Since you tell us nothing about the allocation patterns you are using, the
question has no answer. Without the !analyze -v output, you have done
nothing more than say “My driver doesn’t work, what did I do wrong?”
joe


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks guys, and lookaside list have fixed my BSOD :slight_smile:

Like Scott said, using a lookaside list in this case is likely to simply mask the bug that exists in your driver. If you get a BSOD using regular pool allocs you have a bug, whether or not the BSOD goes away when using lookaside lists.

As the others stated, since you didn’t post your !analyze -v output all we can do is guess, but it’s perfectly likely that you’re prematurely deallocating something, causing the BSOD. When using lookaside lists the memory remains allocated even when released to the lookaside list, so you may not get a BSOD in the same code path since the memory is not really freed.

Christian [MSFT]
This posting is provided “AS IS” with no warranties, and confers no rights.