Botan
1.10.9
|
#include <mmap_mem.h>
Public Member Functions | |
void * | allocate (size_t) |
void | deallocate (void *, size_t) |
void | destroy () |
virtual void | init () |
MemoryMapping_Allocator (Mutex *mutex) | |
std::string | type () const |
Static Public Member Functions | |
static Allocator * | get (bool locking) |
Allocator that uses memory maps backed by disk. We zeroize the map upon deallocation. If swap occurs, the VM will swap to the shared file backing rather than to a swap device, which means we know where it is and can zap it later.
Definition at line 21 of file mmap_mem.h.
|
inline |
mutex | used for internal locking |
Definition at line 27 of file mmap_mem.h.
|
virtualinherited |
Allocate a block of memory
n | how many bytes to allocate |
Implements Botan::Allocator.
Definition at line 131 of file mem_pool.cpp.
References block_size, and Botan::round_up().
|
virtualinherited |
Deallocate memory allocated with allocate()
ptr | the pointer returned by allocate() |
n | the size of the block pointed to by ptr |
Implements Botan::Allocator.
Definition at line 165 of file mem_pool.cpp.
References block_size, and Botan::round_up().
|
virtualinherited |
Shutdown the allocator
Reimplemented from Botan::Allocator.
Definition at line 117 of file mem_pool.cpp.
|
staticinherited |
Acquire a pointer to an allocator
locking | is true if the allocator should attempt to secure the memory (eg for using to store keys) |
Definition at line 90 of file defalloc.cpp.
References alloc, Botan::Library_State::get_allocator(), Botan::Global_State_Management::global_state(), and Botan::Allocator::type().
Referenced by Botan::GMP_Engine::GMP_Engine(), and Botan::MemoryRegion< word >::init().
|
inlinevirtualinherited |
Initialize the allocator
Definition at line 53 of file allocate.h.
Referenced by Botan::Library_State::add_allocator().
|
inlinevirtual |
Implements Botan::Allocator.
Definition at line 28 of file mmap_mem.h.