Re: Locking physical memory (RAM) under Windows

New Message Reply About this list Date view Thread view Subject view Author view

Jim Adler (jadler@soundcode.com)
Wed, 17 Jun 1998 09:14:20 -0700


> GlobalLock/GlobalUnlock do not lock pages into memory. Memory that has
been
> GlobalLock'd can still be paged out.

GlobalLock just changes a memory "handle" to a memory "pointer". It is an
API to allow the memory manager to keep heap memory from getting too
defragmented. These APIs have nothing to do with telling the OS to keep the
data in physical memory. In fact, the Windows memory management APIs are
riddled with obsolescence and ambiguities. For example, in Win32,
GlobalAlloc can be called with GMEM_FIXED flag which returns a
dereferencable 32-bit pointer. One might be tricked into thinking this
would keep the memory from being paged -- sorry, no such luck. Also, under
Win32, GlobalFix is the same as GlobalLock and also has no impact on paging.
Finally, VirtualAlloc can be called with the PAGE_NOCACHE flag. This flag
is only an OS "hint" which is completely ignored in Win95 and cannot be
relied upon in WinNT.

>If you want unpagable memory under Windows, your going to have to do funny
>things with a VxD or some such which can presumably allocate truly locked
>memory (although I've never tried this).

This issue is a perennial nuisance and really undermines the public's
confidence in security products. A month or so back, RSA's SecurPC was
caught with passwords in a swap file (Mike Stay made the original post, I
believe). After a long thread, it was finally suggested (by Peter Gutmann)
that "someone" write a set of drivers to allocate truly non-swappable
memory.

To that end, we are currently developing a set of drivers for Win95 and
WinNT that will allocate non-swappable memory. The drivers will be released
into the public-domain in the hope of putting this issue to rest, on Windows
at least.

Jim

=========
Jim Adler
President
Soundcode, Inc.
www.soundcode.com
425.739.2229 (voice)
425.739.2228 (fax)


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Fri Aug 21 1998 - 17:18:36 ADT