| Botan
    1.10.16
    | 
#include <defalloc.h>
 
  
 | Public Member Functions | |
| void * | allocate (size_t) | 
| void | deallocate (void *, size_t) | 
| void | destroy () | 
| virtual void | init () | 
| Locking_Allocator (Mutex *mutex) | |
| std::string | type () const | 
| Static Public Member Functions | |
| static Allocator * | get (bool locking) | 
Allocator using malloc plus locking
Definition at line 30 of file defalloc.h.
| 
 | inline | 
| mutex | used for internal locking | 
Definition at line 36 of file defalloc.h.
| 
 | virtualinherited | 
Allocate a block of memory
| n | how many bytes to allocate | 
Implements Botan::Allocator.
Definition at line 133 of file mem_pool.cpp.
| 
 | 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 167 of file mem_pool.cpp.
| 
 | virtualinherited | 
Shutdown the allocator
Reimplemented from Botan::Allocator.
Definition at line 119 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::Malloc_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 38 of file defalloc.h.
 1.8.13
 1.8.13