PMDK C++ bindings
1.8.2
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Persistent_ptr allocation functions for arrays. More...
#include <libpmemobj++/allocation_flag.hpp>
#include <libpmemobj++/detail/array_traits.hpp>
#include <libpmemobj++/detail/check_persistent_ptr_array.hpp>
#include <libpmemobj++/detail/common.hpp>
#include <libpmemobj++/detail/life.hpp>
#include <libpmemobj++/detail/variadic.hpp>
#include <libpmemobj++/pexceptions.hpp>
#include <libpmemobj/tx_base.h>
#include <cassert>
#include <limits>
Go to the source code of this file.
Namespaces | |
pmem | |
A persistent version of concurrent hash map implementation Ref: https://arxiv.org/abs/1509.02235. | |
Functions | |
template<typename T > | |
detail::pp_if_array< T >::type | pmem::obj::make_persistent (std::size_t N, allocation_flag flag=allocation_flag::none()) |
Transactionally allocate and construct an array of objects of type T. More... | |
template<typename T > | |
detail::pp_if_size_array< T >::type | pmem::obj::make_persistent (allocation_flag flag=allocation_flag::none()) |
Transactionally allocate and construct an array of objects of type T. More... | |
template<typename T > | |
void | pmem::obj::delete_persistent (typename detail::pp_if_array< T >::type ptr, std::size_t N) |
Transactionally free an array of objects of type T held in a persistent_ptr. More... | |
template<typename T > | |
void | pmem::obj::delete_persistent (typename detail::pp_if_size_array< T >::type ptr) |
Transactionally free an array of objects of type T held in a persistent_ptr. More... | |
Persistent_ptr allocation functions for arrays.
The typical usage examples would be:
void pmem::obj::delete_persistent | ( | typename detail::pp_if_array< T >::type | ptr, |
std::size_t | N | ||
) |
Transactionally free an array of objects of type T held in a persistent_ptr.
This function can be used to transactionally free an array of objects. Calls the objects' destructors before freeing memory. This overload only participates in overload resolution if T is an array.
[in,out] | ptr | persistent pointer to an array of objects. |
[in] | N | the size of the array. |
transaction_scope_error | if called outside of an active transaction |
transaction_free_error | on transactional free failure. |
void pmem::obj::delete_persistent | ( | typename detail::pp_if_size_array< T >::type | ptr | ) |
Transactionally free an array of objects of type T held in a persistent_ptr.
This function can be used to transactionally free an array of objects. Calls the objects' destructors before freeing memory. This overload only participates in overload resolution if T is an array.
[in,out] | ptr | persistent pointer to an array of objects. |
transaction_scope_error | if called outside of an active transaction |
transaction_free_error | on transactional free failure. |
detail::pp_if_array<T>::type pmem::obj::make_persistent | ( | std::size_t | N, |
allocation_flag | flag = allocation_flag::none() |
||
) |
Transactionally allocate and construct an array of objects of type T.
This function can be used to transactionally allocate an array. This overload only participates in overload resolution if T is an array.
[in] | N | the number of array elements. |
[in] | flag | affects behaviour of allocator |
transaction_scope_error | if called outside of an active transaction |
transaction_alloc_error | on transactional allocation failure. |
rethrow | exception from T constructor |
detail::pp_if_size_array<T>::type pmem::obj::make_persistent | ( | allocation_flag | flag = allocation_flag::none() | ) |
Transactionally allocate and construct an array of objects of type T.
This function can be used to transactionally allocate an array. This overload only participates in overload resolution if T is an array.
[in] | flag | affects behaviour of allocator |
transaction_scope_error | if called outside of an active transaction |
transaction_alloc_error | on transactional allocation failure. |
rethrow | exception from T constructor |