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)
Thu, 18 Jun 1998 10:25:23 +1200


On Wed, Jun 17, 1998 at 02:38:21PM -0500, William H. Geiger III wrote:

> Well I wouldn't be all that happy about mlock(). In 99.99% of applications
> if data is swapped to disk it doesn't matter.

mlock only locks selected pages.

mlockall can be used to lock a process entire space and any subsequent pages
if desired, for general applications this is very bad.

> I would hate to think of a system where all the apps were locking memory
> and preventing the OS from doing it's memory management functions.

Most (all?) OSs that support mlock/mlockall have a definable limit on how
many pages each process should be able to lock. Because most applications
that need to lock memory probably only need to lock a few pages, this
shouldn't be an issue.

> IMHO if the swapfile is a serious security risk then one should disable it
> or put it on an encrypted disk.

Disabling swap isn't always an option for a variety of reasons. I'm not sure
exactly how NT chooses to swap data out, other than an NT box with 256MB of
ram and nothing running, still uses 40MB of the swap file at times.... and
without the swap file, bad things have been known to happen.

Without a swap file, many modern applications like Word and Excel couldn't
co-exist (in memory at the same time) without vast amounts of ram, simply
because they are so large, even though their working set might be quite
small depending upon what you are doing.

-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:37 ADT