Bugtraq mailing list archives

Re: win32/memory locking (Re: Reply to EFS note on Bugtraq)


From: Keith Ray <aphex () NULLIFY ORG>
Date: Wed, 24 Jan 2001 14:02:27 -0600

Quoting James Perry <jeperry () UWATERLOO CA>:
As described on the MSDN site:
"The AllocateUserPhysicalPages function is used to allocate physical
memory. Memory allocated by this function must be physically present
in
the system. Once allocated, it is locked down and unavailable to the
rest
of the virtual memory management system of Windows 2000."

_http://msdn.microsoft.com/library/psdk/winbase/memman_0u5v.htm_

The UserPhysicalPages class of functions appear to be directly related
to
kernel calls, so I'd take a guess and say it's probably what you're
looking for.

 - James Perry

AllocateUserPhysicalPages() is only available on Windows 2000.  VirtualAlloc()
with the PAGE_NOCACHE flag is available for Windows NT 3.1+ and Windows 95+.

From the MSDN Library:

PAGE_NOCACHE -
Allows no caching of the committed regions of pages. The hardware attributes
for the physical memory should be specified as "no cache." This is not
recommended for general usage. It is useful for device drivers; for example,
mapping a video frame buffer with no caching. This value is a page protection
modifier, and it is only valid when used with one of the page protections other
than PAGE_NOACCESS.

--------------------------------------------------------------------
Keith Ray                                          aphex () nullify org
                                              http://www.nullify.org
PGP - 0xAE1B3529 - 8227 60E5 BAA5 9461 CAB3 A6F2 4DFE F573 AE1B 3529


Current thread: