NullAllocator< T > Class Template Reference

NULL allocator. More...

`#include <secblock.h>`

Inheritance diagram for NullAllocator< T >:

## Public Types

typedef AllocatorBase< T >::value_type | value_type
typedef AllocatorBase< T >::size_type | size_type
typedef AllocatorBase< T >::difference_type | difference_type
typedef AllocatorBase< T >::pointer | pointer
typedef AllocatorBase< T >::const_pointer | const_pointer
typedef AllocatorBase< T >::reference | reference
typedef AllocatorBase< T >::const_reference | const_reference
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

pointer | allocate (size_type n, const void *unused=NULL)
void | deallocate (void *p, size_type n)
size_type | max_size () const
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.
template<typename V, typename... Args>
void | construct (V *ptr, Args &&... args)
| Constructs a new V using variadic arguments.
template<typename V>
void | destroy (V *ptr)
| Destroys an V constructed with variadic arguments.

## Additional Inherited Members

Static Public Attributes inherited from AllocatorBase< T >
static const size_type | ELEMS_MAX = ...
| Returns the maximum number of elements the allocator can provide.

## Detailed Description

template<class T>
class NullAllocator< T >

NULL allocator.

Template Parameters

  T | class or type

A NullAllocator is useful for fixed-size, stack based allocations (i.e., static arrays used by FixedSizeAllocatorWithCleanup).

A NullAllocator always returns 0 for max_size(), and always returns NULL for allocation requests. Though the allocator does not allocate at runtime, it does perform a secure wipe or zeroization during cleanup.

Definition at line 298 of file secblock.h.

## Member Typedef Documentation

## value_type

template<class T>

typedef AllocatorBase<T>::value_type NullAllocator< T >::value_type

Definition at line 302 of file secblock.h.

## size_type

template<class T>

typedef AllocatorBase<T>::size_type NullAllocator< T >::size_type

Definition at line 302 of file secblock.h.

## difference_type

template<class T>

typedef AllocatorBase<T>::difference_type NullAllocator< T >::difference_type

Definition at line 302 of file secblock.h.

## pointer

template<class T>

typedef AllocatorBase<T>::pointer NullAllocator< T >::pointer

Definition at line 302 of file secblock.h.

## const_pointer

template<class T>

typedef AllocatorBase<T>::const_pointer NullAllocator< T >::const_pointer

Definition at line 302 of file secblock.h.

## reference

template<class T>

typedef AllocatorBase<T>::reference NullAllocator< T >::reference

Definition at line 302 of file secblock.h.

## const_reference

template<class T>

typedef AllocatorBase<T>::const_reference NullAllocator< T >::const_reference

Definition at line 302 of file secblock.h.

## Member Function Documentation

## allocate()

template<class T>

pointer NullAllocator< T >::allocate | ( | size_type | n,
|  | const void * | unused = NULL )

inline

Definition at line 307 of file secblock.h.

## deallocate()

template<class T>

void NullAllocator< T >::deallocate | ( | void * | p,
|  | size_type | n )

inline

Definition at line 313 of file secblock.h.

## max_size()

template<class T>

size_type NullAllocator< T >::max_size | ( |  | ) | const

inline

Definition at line 319 of file secblock.h.

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

- secblock.h