I have some newbie questions regarding IRQL and paging so please bear with me.
Are DriverUnload, AddDevice, and all of the MajorFunction IRPs going to be at
a fixed IRQL (DISPATCH level)? Is there any way they would ever be invoked at
higher (or lower) IRQL levels?
I have seen code that uses #pragmas to designate functions as INIT or PAGE.
I presume that one could also use this mechanism to make unpagable code, true?
Does the kernel set limits on how many pages of non-pagable memory a driver can have?
If a function spans many pages and the function is also marked pageable, are you
always guaranteed that when you enter the function the entire function will be paged in?
<trey.taylor> wrote in message news:xxxxx@ntdev… >I have some newbie questions regarding IRQL and paging so please bear with >me. > > Are DriverUnload, AddDevice, and all of the MajorFunction IRPs going to be > at > a fixed IRQL (DISPATCH level)? Is there any way they would ever be invoked > at > higher (or lower) IRQL levels?
> I have seen code that uses #pragmas to designate functions as INIT or > PAGE. > I presume that one could also use this mechanism to make unpagable code, > true? > Does the kernel set limits on how many pages of non-pagable memory a > driver can have?
The default is non-pageable so the #pragma need not be explicit. There is no limit, though obviously system address space and other things come into play.
> If a function spans many pages and the function is also marked pageable, > are you > always guaranteed that when you enter the function the entire function > will be paged in? > No, there is no such guarantee, the pages will come in as touched.