🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4222

Re: Locking Page in Memory

#4222
From: Eelke
Date: Wed, 08 Mar 2006 11:35
27 lines
2060 bytes
prunesquallor wrote:
> Dear All,
> 
> I want to lock a page in memory (the reason being it will hold cryptographic 
> keys that I don't want swapped out) - so I don't want to grab much memory.
> 
> Research implies that Windows' VirtualLock will lock the page (such as the 
> MS Documentation). But we've found an early version of the MS document which 
> states that VirtualLock does not lock pages in physical memory, but in the 
> process' working set (it's notable that the modern version of the MS 
> documentation seems to be unclear). It this is the case then should the 
> whole process be slung out to disk then the locked page will go with it.

Quote from the MSDN:

<quote>
The working set of a process is the set of memory pages currently 
visible to the process in physical RAM memory. These pages are resident 
and available for an application to use without triggering a page fault. 
The minimum and maximum working set sizes affect the virtual memory 
paging behavior of a process.
</quote>

So I would conclude that locking into the working set is the same as 
locking into physical RAM.

Eelke
Technical Details
Message-ID: <440ec0cc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <440eb97d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a6a321b0cbcc9b74
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 08 Mar 2006 12:35:35 +0100
From: Eelke <e.klein@remove.mplussoftware.nl>
User-Agent: Mozilla Thunderbird 1.0.5 (Windows/20050711)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Locking Page in Memory
References: <440eb97d@newsgroups.borland.com>
In-Reply-To: <440eb97d@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.58.1.162
Message-ID: <440ec0cc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141817548 81.58.1.162 (8 Mar 2006 03:32:28 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail