PMDK C++ bindings
1.8.2
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Persistent_ptr atomic allocation functions for objects. More...
#include <libpmemobj++/allocation_flag.hpp>
#include <libpmemobj++/detail/check_persistent_ptr_array.hpp>
#include <libpmemobj++/detail/common.hpp>
#include <libpmemobj++/detail/make_atomic_impl.hpp>
#include <libpmemobj++/detail/variadic.hpp>
#include <libpmemobj++/make_persistent_array_atomic.hpp>
#include <libpmemobj++/pexceptions.hpp>
#include <libpmemobj++/pool.hpp>
#include <libpmemobj/atomic_base.h>
#include <tuple>
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 , typename... Args> | |
void | pmem::obj::make_persistent_atomic (pool_base &pool, typename detail::pp_if_not_array< T >::type &ptr, allocation_flag_atomic flag, Args &&... args) |
Atomically allocate and construct an object. More... | |
template<typename T , typename... Args> | |
std::enable_if<!detail::is_first_arg_same< allocation_flag_atomic, Args... >::value >::type | pmem::obj::make_persistent_atomic (pool_base &pool, typename detail::pp_if_not_array< T >::type &ptr, Args &&... args) |
Atomically allocate and construct an object. More... | |
template<typename T > | |
void | pmem::obj::delete_persistent_atomic (typename detail::pp_if_not_array< T >::type &ptr) noexcept |
Atomically deallocate an object. More... | |
Persistent_ptr atomic allocation functions for objects.
The typical usage examples would be:
|
noexcept |
Atomically deallocate an object.
There is no way to atomically destroy an object. Any object specific cleanup must be performed elsewhere. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.
param[in,out] ptr the persistent_ptr whose pointee is to be deallocated.
void pmem::obj::make_persistent_atomic | ( | pool_base & | pool, |
typename detail::pp_if_not_array< T >::type & | ptr, | ||
allocation_flag_atomic | flag, | ||
Args &&... | args | ||
) |
Atomically allocate and construct an object.
Constructor parameters are passed through variadic parameters. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.
[in,out] | pool | the pool from which the object will be allocated. |
[in,out] | ptr | the persistent pointer to which the allocation will take place. |
[in] | flag | affects behaviour of allocator |
[in] | args | variadic function parameter containing all parameters passed to the objects constructor. |
std::bad_alloc | on allocation failure. |
std::enable_if<!detail::is_first_arg_same<allocation_flag_atomic, Args...>::value>::type pmem::obj::make_persistent_atomic | ( | pool_base & | pool, |
typename detail::pp_if_not_array< T >::type & | ptr, | ||
Args &&... | args | ||
) |
Atomically allocate and construct an object.
Constructor parameters are passed through variadic parameters. Do NOT use this inside transactions, as it might lead to undefined behavior in the presence of transaction aborts.
[in,out] | pool | the pool from which the object will be allocated. |
[in,out] | ptr | the persistent pointer to which the allocation will take place. |
[in] | args | variadic function parameter containing all parameters passed to the objects constructor. |
std::bad_alloc | on allocation failure. |