Template Class HugePageAllocator

Class Documentation

template<class T>
class HugePageAllocator

an allocator of objects of type T, on huge pages for the large blocks

Public Types

using value_type = T

Public Functions

HugePageAllocator(void) = default
template<class U>
inline HugePageAllocator(const HugePageAllocator<U>&) noexcept
inline T *allocate(std::size_t n)

room for n objects, on huge pages if they fill one at least

inline void deallocate(T *p, std::size_t n) noexcept
Pre:

p was given by allocate( n )

template<class U>
inline bool operator==(const HugePageAllocator<U>&) const noexcept

Public Static Attributes

static constexpr std::size_t PAGE = std::size_t(1) << 21

the size of a huge page, in bytes