PMDK C++ bindings  1.5.2
This is the C++ bindings documentation for PMDK's libpmemobj.
Classes | Public Member Functions | List of all members
pmem::obj::allocator< T, Policy, Traits > Class Template Reference

(EXPERIMENTAL) Encapsulates the information about the persistent memory allocation model using PMDK's libpmemobj. More...

#include <libpmemobj++/allocator.hpp>

Inheritance diagram for pmem::obj::allocator< T, Policy, Traits >:
pmem::obj::standard_alloc_policy< T > pmem::obj::object_traits< T >

Classes

struct  rebind
 Rebind to a different type. More...
 

Public Member Functions

 allocator ()=default
 Defaulted constructor.
 
 ~allocator ()=default
 Defaulted destructor.
 
 allocator (allocator const &rhs)
 Explicit copy constructor.
 
template<typename U >
 allocator (allocator< U > const &)
 Type converting constructor.
 
template<typename U , typename P , typename T2 >
 allocator (allocator< U, P, T2 > const &rhs)
 Type converting constructor.
 
- Public Member Functions inherited from pmem::obj::standard_alloc_policy< T >
 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 , typename = typename std::enable_if< std::is_convertible<U *, T *>::value>::type>
 standard_alloc_policy (standard_alloc_policy< U > const &)
 Type converting constructor.
 
pointer allocate (size_type cnt, const_void_pointer=0)
 Allocate storage for cnt objects of type T. 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...
 
- Public Member Functions inherited from pmem::obj::object_traits< T >
 object_traits ()=default
 Defaulted constructor.
 
 ~object_traits ()=default
 Defaulted destructor.
 
template<typename U , typename = typename std::enable_if< std::is_convertible<U *, T *>::value>::type>
 object_traits (object_traits< U > const &)
 Type converting constructor.
 
void construct (pointer p, const_reference t)
 Create an object at a specific address. More...
 
template<typename... Args>
void construct (pointer p, Args &&... args)
 Create an object at a specific address. More...
 
void destroy (pointer p)
 Destroy an object based on a pointer. More...
 

Detailed Description

template<typename T, typename Policy = standard_alloc_policy<T>, typename Traits = object_traits<T>>
class pmem::obj::allocator< T, Policy, Traits >

(EXPERIMENTAL) Encapsulates the information about the persistent memory allocation model using PMDK's libpmemobj.

This information includes the knowledge of the pointer type, their difference type, the type of the size of objects in this allocation model as well as memory allocation and deallocation primitives.


The documentation for this class was generated from the following file: