NAME
SYNOPSIS
DESCRIPTION
COPYRIGHT
SEE ALSO
libmemkind::pmem::allocator
Note: pmem_allocator.h functionality is considered as a stable API (STANDARD API).
#include <pmem_allocator.h>
Link with -lmemkind
libmemkind::pmem::allocator(const char *dir, size_t max_size);
libmemkind::pmem::allocator(const char &dir, size_t max_size, libmemkind::allocation_policy alloc_policy);
libmemkind::pmem::allocator(const std::string &dir, size_t max_size);
libmemkind::pmem::allocator(const std::string &dir, size_t max_size, libmemkind::allocation_policy alloc_policy);
template <typename U> libmemkind::pmem::allocator<T>::allocator(const libmemkind::pmem::allocator<U>&) noexcept;
template <typename U> libmemkind::pmem::allocator(const allocator<U>&& other) noexcept;
libmemkind::pmem::allocator<T>::~allocator();
T *libmemkind::pmem::allocator<T>::allocate(std::size_t n) const;
void libmemkind::pmem::allocator<T>::deallocate(T *p, std::size_t n) const;
template <class U, class... Args> void libmemkind::pmem::allocator<T>::construct(U *p, Args... args) const;
void libmemkind::pmem::allocator<T>::destroy(T *p) const;
libmemkind::pmem::allocator<T>
libmemkind::allocation_policy
libmemkind::allocation_policy::DEFAULT
Default allocator memory usage policy.
libmemkind::allocation_policy::CONSERVATIVE
Conservative allocator memory usage policy - prioritize memory usage at the
cost of performance.
All public member types and functions correspond to standard library allocator
concepts and definitions. The current implementation supports the C++11 standard.
Template arguments:
Note:
T *libmemkind::pmem::allocator<T>::allocate(std::size_t n)
allocates persistent memory using memkind_malloc()
. Throw std::bad_alloc
when n = 0 or there is not enough memory to satisfy the request.
libmemkind::pmem::allocator<T>::deallocate(T *p, std::size_t n)
deallocates memory associated with pointer returned by allocate()
using
memkind_free()
.
Copyright (C) 2018 - 2022 Intel Corporation. All rights reserved.
memkind_pmem(3), memkind(3)
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.