Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
NullAllocator< T > Class Template Reference

NULL allocator. More...

#include <secblock.h>

Inheritance diagram for NullAllocator< T >:
[legend]
Collaboration diagram for NullAllocator< T >:
[legend]

Public Member Functions

CRYPTOPP_INHERIT_ALLOCATOR_TYPES pointer allocate (size_type n, const void *unused=NULL)
 
void deallocate (void *p, size_type n)
 
CRYPTOPP_CONSTEXPR 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)
 
CRYPTOPP_CONSTEXPR size_type max_size () const
 Returns the maximum number of elements the allocator can provide. More...
 

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 Tpointer
 
typedef const Tconst_pointer
 
typedef Treference
 
typedef const Tconst_reference
 
- Static Protected Member Functions inherited from AllocatorBase< T >
static void CheckSize (size_t size)
 Verifies the allocator can satisfy a request based on size. More...
 

Detailed Description

template<class T>
class NullAllocator< T >

NULL allocator.

Template Parameters
Tclass 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 263 of file secblock.h.

Member Function Documentation

template<class T >
CRYPTOPP_INHERIT_ALLOCATOR_TYPES pointer NullAllocator< T >::allocate ( size_type  n,
const void *  unused = NULL 
)
inline

Definition at line 272 of file secblock.h.

template<class T >
void NullAllocator< T >::deallocate ( void *  p,
size_type  n 
)
inline

Definition at line 278 of file secblock.h.

template<class T >
CRYPTOPP_CONSTEXPR size_type NullAllocator< T >::max_size ( ) const
inline

Definition at line 284 of file secblock.h.


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