NAME
SYNOPSIS
DESCRIPTION
SYSTEM CONFIGURATION
COPYRIGHT
SEE ALSO
libmemkind::static_kind::allocator
Note: memkind_allocator.h functionality is considered as a stable API (STANDARD API).
#include <memkind_allocator.h>
Link with -lmemkind
libmemkind::static_kind::allocator(libmemkind::kinds kind);
template <typename U> libmemkind::static_kind::allocator<T>::allocator(const libmemkind::static_kind::allocator<U>&) noexcept;
template <typename U> libmemkind::static_kind::allocator(const allocator<U>&& other) noexcept;
libmemkind::static_kind::allocator<T>::~allocator();
T *libmemkind::static_kind::allocator<T>::allocate(std::size_t n) const;
void libmemkind::static_kind::allocator<T>::deallocate(T *p, std::size_t n) const;
template <class U, class... Args> void libmemkind::static_kind::allocator<T>::construct(U *p, Args... args) const;
void libmemkind::static_kind::allocator<T>::destroy(T *p) const;
libmemkind::static_kind::allocator<T>
T *libmemkind::static_kind::allocator<T>::allocate(std::size_t n)
memkind_malloc()
. Throw std::bad_alloc when n = 0 or there is not enough
memory to satisfy the request.libmemkind::static_kind::allocator<T>::deallocate(T *p, std::size_t n)
allocate()
using memkind_free()
.libmemkind::kinds
libmemkind::kinds::DEFAULT
libmemkind::kinds::HIGHEST_CAPACITY
libmemkind::kinds::HIGHEST_CAPACITY_PREFERRED
libmemkind::kinds::HIGHEST_CAPACITY
except that if there is not enough
memory in the NUMA node that has the highest capacity in the local domain to satisfy
the request, the allocation will fall back on other memory NUMA nodes.
Note: For this kind, the allocation will not succeed if there are two or more
NUMA nodes that have the highest capacity.libmemkind::kinds::HIGHEST_CAPACITY_LOCAL_PREFERRED
libmemkind::kinds::HIGHEST_CAPACITY_LOCAL
except that if there is not enough
memory in the NUMA node that has the highest capacity to satisfy the request, the
allocation will fall back on other memory NUMA nodes.libmemkind::kinds::LOWEST_LATENCY_LOCAL
libmemkind::kinds::LOWEST_LATENCY_LOCAL_PREFERRED
libmemkind::kinds::LOWEST_LATENCY_LOCAL
except that if there is not
enough memory in the NUMA node that has the lowest latency to satisfy the request,
the allocation will fall back on other memory NUMA nodes.libmemkind::kinds::HIGHEST_BANDWIDTH_LOCAL
libmemkind::kinds::HIGHEST_BANDWIDTH_LOCAL_PREFERRED
libmemkind::kinds::HIGHEST_BANDWIDTH_LOCAL
except that if there
is not enough memory in the NUMA node that has the highest bandwidth to satisfy
the request, the allocation will fall back on other memory NUMA nodes.libmemkind::kinds::HUGETLB
libmemkind::kinds::INTERLEAVE
libmemkind::kinds::HBW
libmemkind::kinds::HBW_ALL
libmemkind::kinds::HBW
except decision regarding closest NUMA node
is postponed until the time of the first write.libmemkind::kinds::HBW_HUGETLB
libmemkind::kinds::HBW
except the allocation is backed by huge pages.
Note: This kind requires huge pages configuration described in the
SYSTEM CONFIGURATION section.libmemkind::kinds::HBW_ALL_HUGETLB
libmemkind::kinds::HBW_ALL
and libmemkind::kinds::HBW_HUGETLB
properties.
Note: This kind requires huge pages configuration described in the
SYSTEM CONFIGURATION section.libmemkind::kinds::HBW_PREFERRED
libmemkind::kinds::HBW
except that if there is not enough high
bandwidth memory to satisfy the request, the allocation will fall back on
standard memory.libmemkind::kinds::HBW_PREFERRED_HUGETLB
libmemkind::kinds::HBW_PREFERRED
except the allocation is backed by
huge pages.
Note: This kind requires huge pages configuration described in the
SYSTEM CONFIGURATION section.libmemkind::kinds::HBW_INTERLEAVE
libmemkind::kinds::HBW
except that the pages that support the
allocation are interleaved across all high bandwidth nodes and transparent huge
pages are disabled.libmemkind::kinds::REGULAR
libmemkind::kinds::DAX_KMEM
libmemkind::kinds::DAX_KMEM_ALL
libmemkind::kinds::DAX_KMEM_PREFERRED
libmemkind::kinds::DAX_KMEM
except that if there is not enough memory
in the closest persistent memory NUMA node to satisfy the request, the allocation
will fall back on other memory NUMA nodes.
Note: For this kind, the allocation will not succeed if two or more persistent
memory NUMA nodes are in the same shortest distance to the same CPU on which process
is eligible to run. Check on that eligibility is done upon starting the application.libmemkind::kinds::DAX_KMEM_INTERLEAVE
libmemkind::kinds::DAX_KMEM
except that the pages that support the
allocation are interleaved across all persistent memory NUMA nodes.sudo sysctl vm.nr_hugepages=<number_of_hugepages>
.
More information can be found here: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt./configure --enable-hwloc
./configure --enable-hwloc
Note: For a given target NUMA Node, the OS exposes only the performance characteristics of the best performing NUMA node.
libhwloc can be reached on: https://www.open-mpi.org/projects/hwloc
Copyright (C) 2019 - 2022 Intel Corporation. All rights reserved.
memkind(3)
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.