Re: Locking physical memory (RAM) under Windows

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

Chris Wedgwood (chris@cybernet.co.nz)
Wed, 17 Jun 1998 22:06:21 +1200


On Wed, Jun 17, 1998 at 01:45:37AM -0400, Marcus Watts wrote:

> The *best* way to understand what GlobalLock/GlobalUnlock do, is to get
> ahold of some sort of hardware 386 emulator with trace/debug features,
> trace Windows as it executes this call, and find out what it does.

This has been discussed before....

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

I have tested this, as has I believe Peter Gutmann and a number of other
people. If someone wants to try this I suggest:

 - allocate some memory

 - put some patterned data into the memory

 - put the process to sleep

 - have another process allocate buffer greaters than the physical ram size
   and walk up and down these to induce heavy swapping.

 - kill both process and start scavenging though the swap file...

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).

Better still, use a real OS that supports mlock.

-cw


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