libmemkind::fixed::allocator<T> - The C++ allocator compatible with the C++ standard library allocator
Contents
Copyright
Copyright (C) 2021 Intel Corporation. All rights reserved.
Description
The libmemkind::fixed::allocator<T> is intended to be used with STL containers to allocate memory on
specific area. Memory management is handled by jemalloc on the supplied area. Refer memkind(3) man page
for more details.
All public member types and functions correspond 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.
Note:T*libmemkind::fixed::allocator<T>::allocate(std::size_tn) allocates memory using memkind_malloc() on
the area supplied to libmemkind::fixed::allocator(). Throws std::bad_alloc when:
n = 0
or there is not enough memory to satisfy the request.
libmemkind::fixed::allocator<T>::deallocate(T*p,std::size_tn) deallocates memory associated with
pointer returned by allocate() using memkind_free().
Name
libmemkind::fixed::allocator<T> - The C++ allocator compatible with the C++ standard library allocator
concepts
Note:fixed_allocator.h is a part of stable API (STANDARD API).
See Also
memkind(3) Intel Corporation 2021-12-03 FIXEDALLOCATOR(3)
Synopsis
#include<fixed_allocator.h>Linkwith-lmemkindlibmemkind::fixed::allocator(void*addr,size_tsize);template<typenameU>libmemkind::fixed::allocator<T>::allocator(constlibmemkind::fixed::allocator<U>&)noexcept;template<typenameU>libmemkind::fixed::allocator<T>::allocator(allocator<U>&&other)noexcept;libmemkind::fixed::allocator<T>::~allocator();T*libmemkind::fixed::allocator<T>::allocate(std::size_tn)const;voidlibmemkind::fixed::allocator<T>::deallocate(T*p,std::size_tn)const;template<classU,class...Args>voidlibmemkind::fixed::allocator<T>::construct(U*p,Args...&&args)const;voidlibmemkind::fixed::allocator<T>::destroy(T*p)const;
