PMDK C++ bindings  1.7
This is the C++ bindings documentation for PMDK's libpmemobj.
Classes | Functions
allocator.hpp File Reference

Persistent memory aware allocator. More...

#include <libpmemobj++/detail/common.hpp>
#include <libpmemobj++/detail/life.hpp>
#include <libpmemobj++/detail/pexceptions.hpp>
#include <libpmemobj++/persistent_ptr.hpp>
#include <libpmemobj++/pext.hpp>
#include <libpmemobj/tx_base.h>

Go to the source code of this file.

Classes

class  pmem::obj::object_traits< T >
 Encapsulates object specific allocator functionality. More...
 
struct  pmem::obj::object_traits< T >::rebind< U >
 Rebind to a different type. More...
 
class  pmem::obj::object_traits< void >
 Object traits specialization for the void type. More...
 
struct  pmem::obj::object_traits< void >::rebind
 Rebind to a different type. More...
 
class  pmem::obj::standard_alloc_policy< T >
 The allocation policy template for a given type. More...
 
struct  pmem::obj::standard_alloc_policy< T >::rebind< U >
 Rebind to a different type. More...
 
class  pmem::obj::standard_alloc_policy< void >
 Void specialization of the standard allocation policy. More...
 
struct  pmem::obj::standard_alloc_policy< void >::rebind
 Rebind to a different type. More...
 
class  pmem::obj::allocator< T, Policy, Traits >
 (EXPERIMENTAL) Encapsulates the information about the persistent memory allocation model using PMDK's libpmemobj. More...
 
struct  pmem::obj::allocator< T, Policy, Traits >::rebind< U >
 Rebind to a different type. More...
 

Functions

template<typename T , typename T2 >
bool pmem::obj::operator== (standard_alloc_policy< T > const &, standard_alloc_policy< T2 > const &)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename OtherAllocator >
bool pmem::obj::operator== (standard_alloc_policy< T > const &, OtherAllocator const &)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename P , typename Tr , typename T2 , typename P2 , typename Tr2 >
bool pmem::obj::operator== (const allocator< T, P, Tr > &lhs, const allocator< T2, P2, Tr2 > &rhs)
 Determines if memory from another allocator can be deallocated from this one. More...
 
template<typename T , typename P , typename Tr , typename OtherAllocator >
bool pmem::obj::operator!= (const allocator< T, P, Tr > &lhs, const OtherAllocator &rhs)
 Determines if memory from another allocator can be deallocated from this one. More...
 

Detailed Description

Persistent memory aware allocator.

(EXPERIMENTAL)

Function Documentation

◆ operator!=()

template<typename T , typename P , typename Tr , typename OtherAllocator >
bool pmem::obj::operator!= ( const allocator< T, P, Tr > &  lhs,
const OtherAllocator &  rhs 
)
inline

Determines if memory from another allocator can be deallocated from this one.

Parameters
[in]lhsleft hand side allocator.
[in]rhsright hand side allocator.
Returns
false if allocators are equivalent in terms of deallocation, true otherwise.

◆ operator==() [1/3]

template<typename T , typename P , typename Tr , typename T2 , typename P2 , typename Tr2 >
bool pmem::obj::operator== ( const allocator< T, P, Tr > &  lhs,
const allocator< T2, P2, Tr2 > &  rhs 
)
inline

Determines if memory from another allocator can be deallocated from this one.

Parameters
[in]lhsleft hand side allocator.
[in]rhsright hand side allocator.
Returns
true if allocators are equivalent in terms of deallocation, false otherwise.

◆ operator==() [2/3]

template<typename T , typename OtherAllocator >
bool pmem::obj::operator== ( standard_alloc_policy< T > const &  ,
OtherAllocator const &   
)
inline

Determines if memory from another allocator can be deallocated from this one.

Returns
false.

◆ operator==() [3/3]

template<typename T , typename T2 >
bool pmem::obj::operator== ( standard_alloc_policy< T > const &  ,
standard_alloc_policy< T2 > const &   
)
inline

Determines if memory from another allocator can be deallocated from this one.

Returns
true.