|
| IntrusiveAllocator (size_t in_defaultAlignment=4) |
|
| IntrusiveAllocator (std::unique_ptr< Allocator > in_nestedAllocator, size_t in_defaultAlignment=4) |
|
void | report (std::ostream &out) const override |
| report stats about blocks of memory allocated.
|
|
void * | allocate (std::size_t size, AllocatorAffinity allocatorAffinity=ALLOCATOR_AFFINITY_OBJECTS) override |
| allocate from the pool of memory blocks, or allocate from a new memory block
|
|
bool | deallocate (void *ptr, std::size_t size) override |
| deallocate, returning data to pool.
|
|
bool | validate () const |
|
size_t | deleteEmptyMemoryBlocks () override |
| delete any MemoryBlock that are empty
|
|
size_t | totalAvailableSize () const override |
| return the total available size of allocated MemoryBlocks
|
|
size_t | totalReservedSize () const override |
| return the total reserved size of allocated MemoryBlocks
|
|
size_t | totalMemorySize () const override |
| return the total memory size of allocated MemoryBlocks
|
|
void | setBlockSize (AllocatorAffinity allocatorAffinity, size_t blockSize) override |
|
| Allocator (size_t in_defaultAlignment=4) |
|
| Allocator (std::unique_ptr< Allocator > in_nestedAllocator, size_t in_defaultAlignment=4) |
|
|
std::vector< std::unique_ptr< MemoryBlocks > > | allocatorMemoryBlocks |
|
std::map< void *, std::shared_ptr< MemoryBlock > > | memoryBlocks |
|
std::map< void *, std::pair< size_t, size_t > > | largeAllocations |
|
std::unique_ptr< Allocator > | nestedAllocator |
|
|
static std::unique_ptr< Allocator > & | instance () |
| Allocator singleton.
|
|
AllocatorType | allocatorType = ALLOCATOR_TYPE_VSG_ALLOCATOR |
|
std::mutex | mutex |
|
size_t | defaultAlignment = 4 |
|
◆ allocate()
void * vsg::IntrusiveAllocator::allocate |
( |
std::size_t | size, |
|
|
AllocatorAffinity | allocatorAffinity = ALLOCATOR_AFFINITY_OBJECTS ) |
|
overridevirtual |
allocate from the pool of memory blocks, or allocate from a new memory block
Implements vsg::Allocator.
◆ deallocate()
bool vsg::IntrusiveAllocator::deallocate |
( |
void * | ptr, |
|
|
std::size_t | size ) |
|
overridevirtual |
◆ deleteEmptyMemoryBlocks()
size_t vsg::IntrusiveAllocator::deleteEmptyMemoryBlocks |
( |
| ) |
|
|
overridevirtual |
◆ report()
void vsg::IntrusiveAllocator::report |
( |
std::ostream & | out | ) |
const |
|
overridevirtual |
report stats about blocks of memory allocated.
Implements vsg::Allocator.
◆ setBlockSize()
void vsg::IntrusiveAllocator::setBlockSize |
( |
AllocatorAffinity | allocatorAffinity, |
|
|
size_t | blockSize ) |
|
overridevirtual |
◆ totalAvailableSize()
size_t vsg::IntrusiveAllocator::totalAvailableSize |
( |
| ) |
const |
|
overridevirtual |
◆ totalMemorySize()
size_t vsg::IntrusiveAllocator::totalMemorySize |
( |
| ) |
const |
|
overridevirtual |
◆ totalReservedSize()
size_t vsg::IntrusiveAllocator::totalReservedSize |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file: