NVML C++ bindings
0.1 experimental
This is the C++ bindings documentation for NVML's libpmemobj.
|
Persistent_ptr transactional allocation functions for objects. More...
#include "libpmemobj++/detail/check_persistent_ptr_array.hpp"
#include "libpmemobj++/detail/common.hpp"
#include "libpmemobj++/detail/pexceptions.hpp"
#include "libpmemobj/tx_base.h"
#include <new>
Go to the source code of this file.
Functions | |
template<typename T , typename... Args> | |
detail::pp_if_not_array< T >::type | nvml::obj::make_persistent (Args &&...args) |
Transactionally allocate and construct an object of type T. More... | |
template<typename T > | |
void | nvml::obj::delete_persistent (typename detail::pp_if_not_array< T >::type ptr) |
Transactionally free an object of type T held in a persitent_ptr. More... | |
Persistent_ptr transactional allocation functions for objects.
The typical usage examples would be:
void nvml::obj::delete_persistent | ( | typename detail::pp_if_not_array< T >::type | ptr | ) |
Transactionally free an object of type T held in a persitent_ptr.
This function can be used to transactionally free an object. Calls the object's destructor before freeing memory. Cannot be used for array types.
[in,out] | ptr | persistent pointer to an object that is not an array. |
transaction_scope_error | if called outside of an active transaction |
transaction_alloc_error | on transactional free failure. |
detail::pp_if_not_array<T>::type nvml::obj::make_persistent | ( | Args &&... | args | ) |
Transactionally allocate and construct an object of type T.
This function can be used to transactionally allocate an object. Cannot be used for array types.
[in,out] | args | a list of parameters passed to the constructor. |
transaction_scope_error | if called outside of an active transaction |
transaction_alloc_error | on transactional allocation failure. |