Mail Archives: djgpp-workers/1997/08/01/09:15:01
Subject: DPMI page-locking counts ?
I've recently ported Peter Gutmann's cryptlib to djgpp.
( http://www.cs.auckland.ac.nz/~pgut001/cryptlib.html )
cryptlib is a very high quality crypto implementation.
For security reasons all sensitive information used by the
library will be page-locked to ensure it is never swapped
to disk.
I'm searching a reliable way to find out if the underlying DPMI host
maintains page locks in a binary form (like CWSDPMI) or a true lock
count - in the latter case I can safely unlock memory blocks.
My current (paranoid) implementation simply ignores unlocking requests,
but this may lead to a shortage of virtual memory in long-running
applications.
Other workarounds or tricks like rounding up the minimum allocation size
to the page size are not acceptable in this situation. As a very last
resort I could provide a special malloc which handles locking
internally, but I'd really prefer something less errorprone.
Markus
- Raw text -