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

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

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


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,131

    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,851

    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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA