gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > Class Template Reference

#include <robin_hood.h>

Public Member Functions

 BulkPoolAllocator () noexcept=default
 
 BulkPoolAllocator (const BulkPoolAllocator &ROBIN_HOOD_UNUSED(o)) noexcept
 
 BulkPoolAllocator (BulkPoolAllocator &&o) noexcept
 
BulkPoolAllocatoroperator= (BulkPoolAllocator &&o) noexcept
 
BulkPoolAllocatoroperator= (const BulkPoolAllocator &ROBIN_HOOD_UNUSED(o)) noexcept
 
 ~BulkPoolAllocator () noexcept
 
void reset () noexcept
 
T * allocate ()
 
void deallocate (T *obj) noexcept
 
void addOrFree (void *ptr, const size_t numBytes) noexcept
 
void swap (BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &other) noexcept
 

Private Member Functions

 ROBIN_HOOD (NODISCARD) size_t calcNumElementsToAlloc() const noexcept
 
void add (void *ptr, const size_t numBytes) noexcept
 
 ROBIN_HOOD (NOINLINE) T *performAllocation()
 

Private Attributes

T * mHead {nullptr}
 
T ** mListForFree {nullptr}
 

Static Private Attributes

static const size_t ALIGNMENT
 
static constexpr size_t ALIGNED_SIZE = ((sizeof(T) - 1) / ALIGNMENT + 1) * ALIGNMENT
 

Detailed Description

template<typename T, size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
class robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >

Definition at line 367 of file robin_hood.h.

Constructor & Destructor Documentation

◆ BulkPoolAllocator() [1/3]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::BulkPoolAllocator ( )
defaultnoexcept

◆ BulkPoolAllocator() [2/3]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::BulkPoolAllocator ( const BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &  ROBIN_HOOD_UNUSEDo)
inlinenoexcept

Definition at line 372 of file robin_hood.h.

◆ BulkPoolAllocator() [3/3]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::BulkPoolAllocator ( BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &&  o)
inlinenoexcept

Definition at line 376 of file robin_hood.h.

◆ ~BulkPoolAllocator()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::~BulkPoolAllocator ( )
inlinenoexcept

Definition at line 399 of file robin_hood.h.

Member Function Documentation

◆ add()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
void robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::add ( void *  ptr,
const size_t  numBytes 
)
inlineprivatenoexcept

◆ addOrFree()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
void robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::addOrFree ( void *  ptr,
const size_t  numBytes 
)
inlinenoexcept

Definition at line 439 of file robin_hood.h.

◆ allocate()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
T* robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::allocate ( )
inline

Definition at line 417 of file robin_hood.h.

◆ deallocate()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
void robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::deallocate ( T *  obj)
inlinenoexcept

Definition at line 431 of file robin_hood.h.

◆ operator=() [1/2]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
BulkPoolAllocator& robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::operator= ( BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &&  o)
inlinenoexcept

Definition at line 383 of file robin_hood.h.

◆ operator=() [2/2]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
BulkPoolAllocator& robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::operator= ( const BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &  ROBIN_HOOD_UNUSEDo)
inlinenoexcept

Definition at line 394 of file robin_hood.h.

◆ reset()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
void robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::reset ( )
inlinenoexcept

◆ ROBIN_HOOD() [1/2]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::ROBIN_HOOD ( NODISCARD  ) const
inlineprivatenoexcept

Definition at line 462 of file robin_hood.h.

◆ ROBIN_HOOD() [2/2]

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::ROBIN_HOOD ( NOINLINE  )
inlineprivate

Definition at line 506 of file robin_hood.h.

◆ swap()

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
void robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::swap ( BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs > &  other)
inlinenoexcept

Definition at line 451 of file robin_hood.h.

Referenced by robin_hood::detail::BulkPoolAllocator< T, MinSize, MaxSize >::swap().

Here is the caller graph for this function:

Member Data Documentation

◆ ALIGNED_SIZE

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
constexpr size_t robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::ALIGNED_SIZE = ((sizeof(T) - 1) / ALIGNMENT + 1) * ALIGNMENT
staticconstexprprivate

◆ ALIGNMENT

template<typename T , size_t MinNumAllocs = 4, size_t MaxNumAllocs = 256>
const size_t robin_hood::detail::BulkPoolAllocator< T, MinNumAllocs, MaxNumAllocs >::ALIGNMENT
staticprivate
Initial value:
=
(ROBIN_HOOD_STD::alignment_of<T>::value > ROBIN_HOOD_STD::alignment_of<T*>::value)
? ROBIN_HOOD_STD::alignment_of<T>::value
: +ROBIN_HOOD_STD::alignment_of<T*>::value

Definition at line 522 of file robin_hood.h.

Referenced by robin_hood::detail::BulkPoolAllocator< T, MinSize, MaxSize >::add(), robin_hood::detail::BulkPoolAllocator< T, MinSize, MaxSize >::addOrFree(), and robin_hood::detail::BulkPoolAllocator< T, MinSize, MaxSize >::ROBIN_HOOD().

◆ mHead

◆ mListForFree


The documentation for this class was generated from the following file: