diff options
author | lloyd <[email protected]> | 2010-03-13 18:34:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-13 18:34:20 +0000 |
commit | 2fbe098b29b9ca611d83d8aedb7457dc925860eb (patch) | |
tree | 16085502d8637e29df59dcd92a4aeb98c899ea32 /src/utils/mlock.h | |
parent | bdb4cd3df0e2ed94d39cff95a83fcd88141c1ef4 (diff) |
At startup, test if lock_mem() at least seems to work. If it doesn't,
immediately fall back the the plain malloc-based allocator, which is
typically quite a bit faster.
Diffstat (limited to 'src/utils/mlock.h')
-rw-r--r-- | src/utils/mlock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/mlock.h b/src/utils/mlock.h index 66ced9e63..fea56d438 100644 --- a/src/utils/mlock.h +++ b/src/utils/mlock.h @@ -13,6 +13,11 @@ namespace Botan { /** +* Check if we can at least potentially lock memory +*/ +bool has_mlock(); + +/** * Lock memory into RAM if possible * @param addr the start of the memory block * @param length the length of the memory block in bytes |