Lock pages in memory
- From: "Simon (Sly)" <SimonSly@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 02:41:03 -0700
We're have a process using AWE, hence requiring the priviledge to lock pages
in memory. We wish to prevent the entire process address space from being
paged out, not just AWE allocated memory.
We call:
LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME, ...)
AdjustTokenPrivileges(...)
to set the SE_LOCK_MEMORY_NAME privilege (as documented in AWE code example
on MSDN).
My understanding is this just sets the security privilege, and the AWE call
to AllocateUserPhysicalPages() itself will lock those allocated pages in
memory?
Therefore, this implies that the remainder of the process (non AWE wise) is
available to be paged out as normal (observed behaviour).
So, my question is: how do we request that the entire process address space
is locked in memory and prevented from being paged out?
I've found some documentation on a call to NtLockVirtualMemory() at
http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/Memory%20Management/Virtual%20Memory/NtLockVirtualMemory.html.
Is this the required approach, and applicable to 2003 Server Enterprise
Edition?
Thanks,
Simon
.
- Follow-Ups:
- Re: Lock pages in memory
- From: Martin Richter [MVP]
- Re: Lock pages in memory
- Prev by Date: Re: WaitForSingleObject on a closed mutex handle waits infinitely in HT Environment
- Next by Date: Re: Lock pages in memory
- Previous by thread: Please Help!
- Next by thread: Re: Lock pages in memory
- Index(es):
Relevant Pages
|