Botan
1.10.9
|
#include <defalloc.h>
Public Member Functions | |
void * | allocate (size_t) |
void | deallocate (void *, size_t) |
virtual void | destroy () |
virtual void | init () |
std::string | type () const |
Static Public Member Functions | |
static Allocator * | get (bool locking) |
Allocator using malloc
Definition at line 18 of file defalloc.h.
|
virtual |
Allocate a block of memory
n | how many bytes to allocate |
Implements Botan::Allocator.
Definition at line 55 of file defalloc.cpp.
|
virtual |
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 66 of file defalloc.cpp.
|
inlinevirtualinherited |
Shutdown the allocator
Reimplemented in Botan::Pooling_Allocator.
Definition at line 58 of file allocate.h.
|
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 24 of file defalloc.h.