PMDK C++ bindings
1.13.0-git107.g7e59f08f
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Void specialization of the standard allocation policy. More...
#include <libpmemobj++/allocator.hpp>
Classes | |
struct | rebind |
Rebind to a different type. More... | |
Public Types | |
using | value_type = void |
using | pointer = persistent_ptr< value_type > |
using | const_pointer = persistent_ptr< const value_type > |
using | reference = value_type |
using | const_reference = const value_type |
using | size_type = std::size_t |
using | bool_type = bool |
Public Member Functions | |
standard_alloc_policy ()=default | |
Defaulted constructor. | |
~standard_alloc_policy ()=default | |
Defaulted destructor. | |
standard_alloc_policy (standard_alloc_policy const &) | |
Explicit copy constructor. | |
template<typename U > | |
standard_alloc_policy (standard_alloc_policy< U > const &) | |
Type converting constructor. | |
pointer | allocate (size_type cnt, const_pointer=0) |
Allocate storage for cnt bytes. More... | |
void | deallocate (pointer p, size_type=0) |
Deallocates storage pointed to p, which must be a value returned by a previous call to allocate that has not been invalidated by an intervening call to deallocate. More... | |
size_type | max_size () const |
The largest value that can meaningfully be passed to allocate(). More... | |
Void specialization of the standard allocation policy.
|
inline |
Allocate storage for cnt bytes.
Assumes sizeof(void) = 1.
[in] | cnt | the number of bytes to be allocated. |
transaction_scope_error | if called outside of an active transaction. |
transaction_out_of_memory | if there is no free memory of requested size. |
transaction_alloc_error | on transactional allocation failure. |
|
inline |
Deallocates storage pointed to p, which must be a value returned by a previous call to allocate that has not been invalidated by an intervening call to deallocate.
[in] | p | pointer to the memory to be deallocated. |
transaction_scope_error | if called outside of an active transaction. |
transaction_free_error | on transactional free failure. |
|
inline |
The largest value that can meaningfully be passed to allocate().