Ryan Malayter wrote:
> On 5/15/07, Alessandro Vesely <[EMAIL PROTECTED]> wrote:
>> On Windows there is
>> just one way to share memory. Memory locking must be understood in that
>> context. It is meant for synchronization purposes, not for security.
> 
> LocalLock() and GlobalLock() do indeed seem to be for synchronization,
> but VirtualLock() seems a different beast entirely.

Each XyzAlloc has its corresponding XyzLock. I don't count LocalAlloc,
GlobalAlloc, HeapAlloc as memory sharing functions.  VirtualAlloc can
be used after MapViewOfFile, more or less where one would possibly use
madvise() on Linux, except that it's mandatory.

About VirtualLock, MSDN says:

  Locks the specified region of the process's virtual address space
  into physical memory, ensuring that subsequent access to the region
  will not incur a page fault.

It doesn't ensure the corresponding region on the swap file is swept.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to