code section from being paged

What does " #pragma code_seg(“PAGE”)." mean? If it mean the code below it could be paged. And how could I to prevent a code section from being paged?

craig

This directive indicates that the code in the current module is to be placed
in a pageable section. If you remove the #pragma, you get the default
behavior, which is nonpageable code. You can also use
MmLockPageableCodeSection() to make the entire section nonpageable and
return it to pageable state with MmUnlockPageableImageSection() later.


Tom Stonecypher
Principal, iStreamConsulting
http://www.iStreamConsulting.com

“craiglei” wrote in message news:xxxxx@ntdev…
What does " #pragma code_seg(“PAGE”)." mean? If it mean the code below it
could be paged. And how could I to prevent a code section from being paged?

craig

The code is not paged by default.

Paged code saves memory, but cannot run on >= DISPATCH_LEVEL - cannot acquire spinlocks, contain DPCs, ISRs or some other callbacks which can be called by the kernel or other modules at DISPATCH_LEVEL or even <= DISPATCH_LEVEL.

Max
----- Original Message -----
From: craiglei
To: NT Developers Interest List
Sent: Tuesday, June 04, 2002 1:32 PM
Subject: [ntdev] code section from being paged

What does " #pragma code_seg(“PAGE”)." mean? If it mean the code below it could be paged. And how could I to prevent a code section from being paged?

craig

b???.???????v??ׯjɚ???ځ?+i??d??{.n???zwZnV??隊[h???z{]z?x?yb??(??(