Nonpaged from lookasidelist

i want to allocate nonpaged memory from lookasidelist.
can any of the following be used ------ ExAllocateFromLookasideListEx or ExAllocateFromNPagedLookasideList

I’m AFI, but in general all would work, you should check the header file for version availability.

However “I have heard it say” that the changes to the pool management about the time of XP, alongside CPU performance improvements have rendered look aside lists redundant. Of course the rewrite in win10 may have reverted that choice (although I don’t think ExFreePool is recursive any more)

thankyou…so does that means ExAllocatePoolWithTag must be used instead of lookasidelists ?

First, the “better” function to use is ExAllocateFromLookasideListEx which supports either paged or non-paged lookaside list management. You provide allocate and free routines, so you can do whatever you want.

Second… Think carefully about whether you REALLY want Windows lookaside list functionality. The nature of these routines is that WINDOWS manages the size of these lists for you. That means Windows controls when list entries are pre-allocated and when the list is pruned. That’s terrific if your needs are modest and what you want to do is optimize the overall use of system memory. But it’s not so great if you want to ensure that you have pre-allocated entries that you can use… even if the overall available system memory gets low.

Folks who’ve been on this list for a while know that I am not a fan of the Windows-provided lookaside lists, and I decline to use them. When I want a pre-allocated list, I want to be able to control the pre-allocation behavior. I don’t want Windows to sacrifice MY entries for the ability of some OTHER component to allocate.

When I need a lookaside list, I just create my own. It’s super simple… and I can control everything about it.

Just some things to consider,

Peter

that it is a very detail and clear answer. thank you peter.