| Botan
    1.10.16
    | 
#include <allocate.h>
 
  
 | Public Member Functions | |
| virtual void * | allocate (size_t n)=0 | 
| virtual void | deallocate (void *ptr, size_t n)=0 | 
| virtual void | destroy () | 
| virtual void | init () | 
| virtual std::string | type () const =0 | 
| virtual | ~Allocator () | 
| Static Public Member Functions | |
| static Allocator * | get (bool locking) | 
Allocator Interface
Definition at line 19 of file allocate.h.
| 
 | inlinevirtual | 
Definition at line 60 of file allocate.h.
| 
 | pure virtual | 
Allocate a block of memory
| n | how many bytes to allocate | 
Implemented in Botan::Pooling_Allocator, and Botan::Malloc_Allocator.
Referenced by Botan::MemoryRegion< word >::init().
| 
 | pure virtual | 
Deallocate memory allocated with allocate()
| ptr | the pointer returned by allocate() | 
| n | the size of the block pointed to by ptr | 
Implemented in Botan::Pooling_Allocator, and Botan::Malloc_Allocator.
Referenced by Botan::MemoryRegion< word >::init().
| 
 | inlinevirtual | 
Shutdown the allocator
Reimplemented in Botan::Pooling_Allocator.
Definition at line 58 of file allocate.h.
| 
 | static | 
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::Malloc_Allocator::type().
Referenced by Botan::GMP_Engine::GMP_Engine(), and Botan::MemoryRegion< word >::init().
| 
 | inlinevirtual | 
Initialize the allocator
Definition at line 53 of file allocate.h.
Referenced by Botan::Library_State::add_allocator().
| 
 | pure virtual | 
Implemented in Botan::Locking_Allocator, Botan::MemoryMapping_Allocator, and Botan::Malloc_Allocator.
Referenced by Botan::Library_State::add_allocator().
 1.8.13
 1.8.13