Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Nonpaged from lookasidelist

MilvinMilvin Member Posts: 11

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

Comments

  • rod_widdowsonrod_widdowson Member - All Emails Posts: 1,081

    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)

  • MilvinMilvin Member Posts: 11

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

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,505

    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

    Peter Viscarola
    OSR
    @OSRDrivers

  • MilvinMilvin Member Posts: 11

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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE