Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
Botan::secure_allocator< T > Class Template Reference

`#include <secmem.h>`

## Public Types
typedef std::size_t | size_type
typedef T | value_type

## Public Member Functions
T * | allocate (std::size_t n)
void | deallocate (T *p, std::size_t n)
secure_allocator & | operator= (const secure_allocator &) noexcept=default
| secure_allocator () noexcept=default
| secure_allocator (const secure_allocator &) noexcept=default
template<typename U >
| secure_allocator (const secure_allocator< U > &) noexcept
| ~secure_allocator () noexcept=default

## Detailed Description

### template<typename T>
class Botan::secure_allocator< T >

Definition at line 21 of file secmem.h.

## Member Typedef Documentation

template<typename T >

typedef std::size_t Botan::secure_allocator< T >::size_type

Definition at line 36 of file secmem.h.

template<typename T >

typedef T Botan::secure_allocator< T >::value_type

Definition at line 32 of file secmem.h.

## Constructor & Destructor Documentation

template<typename T >

Botan::secure_allocator< T >::secure_allocator | ( |  | ) |
| default noexcept

template<typename T >

Botan::secure_allocator< T >::secure_allocator | ( | const secure_allocator< T > & |  | ) |
| default noexcept

template<typename T >

Botan::secure_allocator< T >::~secure_allocator | ( |  | ) |
| default noexcept

template<typename T >
template<typename U >

Botan::secure_allocator< T >::secure_allocator | ( | const secure_allocator< U > & |  | ) |
| inline noexcept

Definition at line 44 of file secmem.h.

44 {}

## Member Function Documentation

template<typename T >

T* Botan::secure_allocator< T >::allocate | ( | std::size_t | n | ) |
| inline

Definition at line 46 of file secmem.h.

References Botan::allocate_memory(), and T.

47 {
48 return static_cast<T*>(allocate_memory(n, sizeof(T)));
49 }
Botan::allocate_memory
BOTAN_MALLOC_FN void * allocate_memory(size_t elems, size_t elem_size)
Definition: mem_ops.cpp:18
T
fe T
Definition: ge.cpp:37
template<typename T >

void Botan::secure_allocator< T >::deallocate | ( | T * | p,
|  | std::size_t | n
| ) |  |
| inline

Definition at line 51 of file secmem.h.

References Botan::deallocate_memory(), and T.

52 {
53 deallocate_memory(p, n, sizeof(T));
54 }
Botan::deallocate_memory
void deallocate_memory(void *p, size_t elems, size_t elem_size)
Definition: mem_ops.cpp:34
T
fe T
Definition: ge.cpp:37
template<typename T >

secure_allocator& Botan::secure_allocator< T >::operator= | ( | const secure_allocator< T > & |  | ) |
| default noexcept

The documentation for this class was generated from the following file:

- src/lib/base/secmem.h