Provided by: libmemkind-dev_1.9.0-2_amd64 bug


       pmem::allocator<T>  - The C++ allocator compatible with the C++ standard library allocator
       Note: This is EXPERIMENTAL API. The functionality  and  the  header  file  itself  can  be
       changed (including non-backward compatible changes), or removed.


       #include <pmem_allocator.h>

       Link with -lmemkind

       pmem::allocator(const char *dir, size_t max_size);
       pmem::allocator(const std::string &dir, size_t max_size);
       template <typename U> pmem::allocator<T>::allocator(const pmem::allocator<U>&) noexcept;
       template <typename U> pmem::allocator(const allocator<U>&& other) noexcept;
       T *pmem::allocator<T>::allocate(std::size_t n) const;
       void pmem::allocator<T>::deallocate(T *p, std::size_t n) const;
       template <class U, class... Args> void pmem::allocator<T>::construct(U *p, Args... args) const;
       void pmem::allocator<T>::destroy(T *p) const;


       The  pmem::allocator<T>  is intended to be used with STL containers to allocate persistent
       memory.  Memory  management  is   based   on   memkind_pmem   (memkind   library).   Refer
       memkind_pmem(3) and memkind(3) man page for more details.

       All  public  member types and functions corresponds to standard library allocator concepts
       and definitions. The current implementation supports C++11 standard.

       Template arguments:
       T is an object type aliased by value_type.
       U is an object type.

       T *pmem::allocator<T>::allocate(std::size_t n) allocates persistent  memory  memory  using
       memkind_malloc().  Throw std::bad_alloc when:
              n = 0
              or there is not enough memory to satisfy the request.

       pmem::allocator<T>::deallocate(T  *p,  std::size_t  n)  deallocates memory associated with
       pointer returned by allocate() using memkind_free().


       Copyright (C) 2018 - 2019 Intel Corporation. All rights reserved.


       memkind_pmem(3), memkind(3)