an allocator of objects of type T on blocks of 0s, aligned to a huge page if they fill one at least [see the file]
More...
#include <ADS/memory/HugePageAllocator.h>
|
| | ZeroPageAllocator (void)=default |
| | the allocator, which has no state
|
| template<class U> |
| | ZeroPageAllocator (const ZeroPageAllocator< U > &) noexcept |
| | the allocator of objects of type T, from that of type U
|
| T * | allocate (std::size_t n) |
| | room for \( n \) objects, all 0 bits: a block of \( b \) bytes of std::calloc() if \( b \) is less than a huge page, the place aligned to a huge page in one of \( b \) bytes, a huge page and a pointer, which holds the block, otherwise
|
| void | deallocate (T *p, std::size_t n) noexcept |
| | the room \( p \) of \( n \) objects given back to the system
|
| template<class U> |
| bool | operator== (const ZeroPageAllocator< U > &) const noexcept |
| | true: the allocators are all equal
|
|
| static constexpr std::size_t | PAGE = std::size_t( 1 ) << 21 |
| | the size of a huge page, in bytes
|
template<class T>
class ADS::ZeroPageAllocator< T >
an allocator of objects of type T on blocks of 0s, aligned to a huge page if they fill one at least [see the file]
◆ is_zeroed
◆ value_type
◆ ZeroPageAllocator() [1/2]
the allocator, which has no state
◆ ZeroPageAllocator() [2/2]
template<class T>
template<class U>
the allocator of objects of type T, from that of type U
◆ allocate()
room for \( n \) objects, all 0 bits: a block of \( b \) bytes of std::calloc() if \( b \) is less than a huge page, the place aligned to a huge page in one of \( b \) bytes, a huge page and a pointer, which holds the block, otherwise
◆ deallocate()
the room \( p \) of \( n \) objects given back to the system
- Precondition
- \( p \) was given by allocate( n )
◆ operator==()
template<class T>
template<class U>
true: the allocators are all equal
◆ PAGE
the size of a huge page, in bytes
The documentation for this class was generated from the following file: