Botan: src/utils/mlock.h Source File

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

mlock.h
Go to the documentation of this file.
1 /*
2 * Memory Locking Functions
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_MLOCK_H__
9 #define BOTAN_MLOCK_H__
10
11 #include <botan/types.h>
12
13 namespace Botan {
14
15 /**
16 * Check if we can at least potentially lock memory
17 */
18 bool has_mlock();
19
20 /**
21 * Lock memory into RAM if possible
22 * @param addr the start of the memory block
23 * @param length the length of the memory block in bytes
24 * @returns true if successful, false otherwise
25 */
26 bool lock_mem(void* addr, size_t length);
27
28 /**
29 * Unlock memory locked with lock_mem()
30 * @param addr the start of the memory block
31 * @param length the length of the memory block in bytes
32 */
33 void unlock_mem(void* addr, size_t length);
34
35 }
36
37 #endif
Botan::has_mlock
bool has_mlock()
Definition: mlock.cpp:19
Botan
Definition: algo_base.h:14
Botan::unlock_mem
void unlock_mem(void *ptr, size_t bytes)
Definition: mlock.cpp:45
Botan::lock_mem
bool lock_mem(void *ptr, size_t bytes)
Definition: mlock.cpp:31