#include <json/allocator.h>
Classes | |
struct | rebind |
Public Types | |
using | value_type = T |
using | pointer = T * |
using | const_pointer = const T * |
using | reference = T & |
using | const_reference = const T & |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
Public Member Functions | |
pointer | allocate (size_type n) |
Allocate memory for N items using the standard allocator. More... | |
void | deallocate (volatile pointer p, size_type n) |
Release memory which was allocated for N items at pointer P. More... | |
template<typename... Args> | |
void | construct (pointer p, Args &&... args) |
Construct an item in-place at pointer P. More... | |
size_type | max_size () const |
pointer | address (reference x) const |
const_pointer | address (const_reference x) const |
void | destroy (pointer p) |
Destroy an item in-place at pointer P. More... | |
SecureAllocator () | |
template<typename U > | |
SecureAllocator (const SecureAllocator< U > &) | |
Definition at line 15 of file allocator.h.
using Json::SecureAllocator< T >::const_pointer = const T* |
Definition at line 20 of file allocator.h.
using Json::SecureAllocator< T >::const_reference = const T& |
Definition at line 22 of file allocator.h.
using Json::SecureAllocator< T >::difference_type = std::ptrdiff_t |
Definition at line 24 of file allocator.h.
using Json::SecureAllocator< T >::pointer = T* |
Definition at line 19 of file allocator.h.
using Json::SecureAllocator< T >::reference = T& |
Definition at line 21 of file allocator.h.
using Json::SecureAllocator< T >::size_type = std::size_t |
Definition at line 23 of file allocator.h.
using Json::SecureAllocator< T >::value_type = T |
Definition at line 18 of file allocator.h.
|
inline |
Definition at line 70 of file allocator.h.
|
inline |
Definition at line 71 of file allocator.h.
|
inline |
Definition at line 59 of file allocator.h.
|
inline |
Definition at line 57 of file allocator.h.
|
inline |
Allocate memory for N items using the standard allocator.
Definition at line 29 of file allocator.h.
|
inline |
Construct an item in-place at pointer P.
Definition at line 50 of file allocator.h.
|
inline |
Release memory which was allocated for N items at pointer P.
The memory block is filled with zeroes before being released. The pointer argument is tagged as "volatile" to prevent the compiler optimizing out this critical step.
Definition at line 41 of file allocator.h.
|
inline |
Destroy an item in-place at pointer P.
Definition at line 64 of file allocator.h.
|
inline |
Definition at line 55 of file allocator.h.