Crypto++ 8.7
Free C++ class library of cryptographic schemes
List of all members
FixedSizeAllocatorWithCleanup< T, S, A, T_Align16 > Class Template Reference

Static secure memory block with cleanup. More...

#include <secblock.h>

+ Inheritance diagram for FixedSizeAllocatorWithCleanup< T, S, A, T_Align16 >:

Additional Inherited Members

- Public Types inherited from AllocatorBase< T >
typedef T value_type
 
typedef size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
- Public Member Functions inherited from AllocatorBase< T >
pointer address (reference r) const
 
const_pointer address (const_reference r) const
 
void construct (pointer p, const T &val)
 
void destroy (pointer p)
 
size_type max_size () const
 Returns the maximum number of elements the allocator can provide. More...
 
template<typename V , typename... Args>
void construct (V *ptr, Args &&... args)
 Constructs a new V using variadic arguments. More...
 
template<typename V >
void destroy (V *ptr)
 Destroys an V constructed with variadic arguments. More...
 
- Static Public Attributes inherited from AllocatorBase< T >
static const size_type ELEMS_MAX = ...
 Returns the maximum number of elements the allocator can provide. More...
 

Detailed Description

template<class T, size_t S, class A = NullAllocator<T>, bool T_Align16 = false>
class FixedSizeAllocatorWithCleanup< T, S, A, T_Align16 >

Static secure memory block with cleanup.

Template Parameters
Tclass or type
Sfixed-size of the stack-based memory block, in elements
T_Align16boolean that determines whether allocations should be aligned on a 16-byte boundary

FixedSizeAllocatorWithCleanup provides a fixed-size, stack- based allocation at compile time. The class can grow its memory block at runtime if a suitable allocator is available. If size grows beyond S and a suitable allocator is available, then the statically allocated array is obsoleted.

Note
This allocator can't be used with standard collections because they require that all objects of the same allocator type are equivalent.

Definition at line 336 of file secblock.h.


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