Botan
1.11.15
|
#include <secmem.h>
Public Types | |
typedef const T * | const_pointer |
typedef const T & | const_reference |
typedef std::ptrdiff_t | difference_type |
typedef T * | pointer |
typedef T & | reference |
typedef std::size_t | size_type |
typedef T | value_type |
Public Member Functions | |
pointer | address (reference x) const noexcept |
const_pointer | address (const_reference x) const noexcept |
pointer | allocate (size_type n, const void *=0) |
template<typename U , typename... Args> | |
void | construct (U *p, Args &&...args) |
void | deallocate (pointer p, size_type n) |
template<typename U > | |
void | destroy (U *p) |
size_type | max_size () const noexcept |
secure_allocator () noexcept | |
~secure_allocator () noexcept |
typedef const T* Botan::secure_allocator< T >::const_pointer |
typedef const T& Botan::secure_allocator< T >::const_reference |
typedef std::ptrdiff_t Botan::secure_allocator< T >::difference_type |
typedef T* Botan::secure_allocator< T >::pointer |
typedef T& Botan::secure_allocator< T >::reference |
typedef std::size_t Botan::secure_allocator< T >::size_type |
typedef T Botan::secure_allocator< T >::value_type |
Botan::secure_allocator< T >::secure_allocator | ( | ) | [inline] |
Botan::secure_allocator< T >::~secure_allocator | ( | ) | [inline] |
pointer Botan::secure_allocator< T >::address | ( | reference | x | ) | const [inline] |
const_pointer Botan::secure_allocator< T >::address | ( | const_reference | x | ) | const [inline] |
pointer Botan::secure_allocator< T >::allocate | ( | size_type | n, |
const void * | = 0 |
||
) | [inline] |
Definition at line 47 of file secmem.h.
References Botan::clear_mem(), Botan::mlock_allocator::instance(), and n.
void Botan::secure_allocator< T >::construct | ( | U * | p, |
Args &&... | args | ||
) | [inline] |
void Botan::secure_allocator< T >::deallocate | ( | pointer | p, |
size_type | n | ||
) | [inline] |
Definition at line 59 of file secmem.h.
References Botan::mlock_allocator::instance(), and Botan::zero_mem().
{ zero_mem(p, n); #if defined(BOTAN_HAS_LOCKING_ALLOCATOR) if(mlock_allocator::instance().deallocate(p, n, sizeof(T))) return; #endif delete [] p; }
void Botan::secure_allocator< T >::destroy | ( | U * | p | ) | [inline] |
size_type Botan::secure_allocator< T >::max_size | ( | ) | const [inline] |