DPC++ Runtime
Runtime libraries for oneAPI DPC++
Bucket Class Reference
Collaboration diagram for Bucket:

Public Member Functions

 Bucket (size_t Sz, USMAllocContext::USMAllocImpl &AllocCtx)
 
void * getChunk (bool &FromPool)
 
void * getSlab (bool &FromPool)
 
size_t getSize () const
 
void freeChunk (void *Ptr, Slab &Slab, bool &ToPool)
 
void freeSlab (Slab &Slab, bool &ToPool)
 
SystemMemorygetMemHandle ()
 
MemType getMemType ()
 
USMAllocContext::USMAllocImplgetUsmAllocCtx ()
 
bool CanPool (bool &ToPool)
 
size_t SlabMinSize ()
 
size_t SlabAllocSize ()
 
size_t ChunkCutOff ()
 
size_t Capacity ()
 
size_t MaxPoolableSize ()
 
void countAlloc (bool FromPool)
 
void countFree ()
 
void updateStats (int InUse, int InPool)
 
void printStats (bool &TitlePrinted, MemType MT)
 

Public Attributes

size_t allocCount
 
size_t maxSlabsInUse
 

Detailed Description

Definition at line 416 of file usm_allocator.cpp.

Constructor & Destructor Documentation

◆ Bucket()

Bucket::Bucket ( size_t  Sz,
USMAllocContext::USMAllocImpl AllocCtx 
)
inline

Definition at line 463 of file usm_allocator.cpp.

Member Function Documentation

◆ CanPool()

◆ Capacity()

size_t Bucket::Capacity ( )

◆ ChunkCutOff()

size_t Bucket::ChunkCutOff ( )

◆ countAlloc()

void Bucket::countAlloc ( bool  FromPool)

Definition at line 898 of file usm_allocator.cpp.

References allocCount.

Referenced by USMAllocContext::USMAllocImpl::allocate().

◆ countFree()

void Bucket::countFree ( )

Definition at line 904 of file usm_allocator.cpp.

Referenced by USMAllocContext::USMAllocImpl::deallocate().

◆ freeChunk()

void Bucket::freeChunk ( void *  Ptr,
Slab Slab,
bool &  ToPool 
)

Definition at line 808 of file usm_allocator.cpp.

References Slab::freeChunk().

Referenced by USMAllocContext::USMAllocImpl::deallocate().

◆ freeSlab()

void Bucket::freeSlab ( Slab Slab,
bool &  ToPool 
)

Definition at line 753 of file usm_allocator.cpp.

References CanPool(), and Slab::getIterator().

Referenced by USMAllocContext::USMAllocImpl::deallocate().

◆ getChunk()

void * Bucket::getChunk ( bool &  FromPool)

Definition at line 791 of file usm_allocator.cpp.

Referenced by USMAllocContext::USMAllocImpl::allocate().

◆ getMemHandle()

SystemMemory & Bucket::getMemHandle ( )

Definition at line 875 of file usm_allocator.cpp.

References USMAllocContext::USMAllocImpl::getMemHandle().

Referenced by getMemType(), and Slab::~Slab().

◆ getMemType()

MemType Bucket::getMemType ( )

Definition at line 877 of file usm_allocator.cpp.

References getMemHandle(), and SystemMemory::getMemType().

Referenced by Capacity(), MaxPoolableSize(), SlabMinSize(), and updateStats().

◆ getSize()

size_t Bucket::getSize ( ) const
inline

◆ getSlab()

void * Bucket::getSlab ( bool &  FromPool)

Definition at line 741 of file usm_allocator.cpp.

Referenced by USMAllocContext::USMAllocImpl::allocate().

◆ getUsmAllocCtx()

USMAllocContext::USMAllocImpl& Bucket::getUsmAllocCtx ( )
inline

Definition at line 488 of file usm_allocator.cpp.

◆ MaxPoolableSize()

size_t Bucket::MaxPoolableSize ( )

◆ printStats()

void Bucket::printStats ( bool &  TitlePrinted,
MemType  MT 
)

◆ SlabAllocSize()

size_t Bucket::SlabAllocSize ( )

Definition at line 881 of file usm_allocator.cpp.

References getSize(), and SlabMinSize().

Referenced by CanPool(), and updateStats().

◆ SlabMinSize()

size_t Bucket::SlabMinSize ( )

◆ updateStats()

void Bucket::updateStats ( int  InUse,
int  InPool 
)

Member Data Documentation

◆ allocCount

size_t Bucket::allocCount

Definition at line 460 of file usm_allocator.cpp.

Referenced by countAlloc(), and printStats().

◆ maxSlabsInUse

size_t Bucket::maxSlabsInUse

Definition at line 461 of file usm_allocator.cpp.

Referenced by printStats(), and updateStats().


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