Inherits AZ::RHI::Allocator.
◆ Allocate()
VirtualAddress AZ::RHI::FreeListAllocator::Allocate |
( |
size_t |
byteCount, |
|
|
size_t |
byteAlignment |
|
) |
| |
|
overridevirtual |
Allocates a virtual address relative to the base address provided at initialization time.
- Parameters
-
byteCount | The number of bytes to allocate. |
byteAlignement | The alignment used to align the allocation. |
Implements AZ::RHI::Allocator.
◆ Clone()
void AZ::RHI::FreeListAllocator::Clone |
( |
RHI::Allocator * |
newAllocator | ) |
|
|
overridevirtual |
Clone the current allocator to the new allocator passed in.
Reimplemented from AZ::RHI::Allocator.
◆ ComputeFragmentation()
float AZ::RHI::FreeListAllocator::ComputeFragmentation |
( |
| ) |
const |
|
overridevirtual |
Compute the fragmentation present in the allocator (possibly an estimate). The returned value is expected to be a measure between 0.f and 1.f inclusive, with 0.f indicating zero fragmentation.
Reimplemented from AZ::RHI::Allocator.
◆ DeAllocate()
Deallocates an allocation. The memory is not reclaimed until garbage collect is called. Depending on the garbage collection latency, it may take several garbage collection cycles before the memory is reclaimed.
Implements AZ::RHI::Allocator.
◆ GarbageCollect()
void AZ::RHI::FreeListAllocator::GarbageCollect |
( |
| ) |
|
|
overridevirtual |
Allocations are deferred-released until a specific number of GC cycles have occurred. This is useful for allocations actively being consumed by the GPU.
Implements AZ::RHI::Allocator.
◆ GarbageCollectForce()
void AZ::RHI::FreeListAllocator::GarbageCollectForce |
( |
| ) |
|
|
overridevirtual |
Forces garbage collection of all allocations, regardless of the GC latency.
Implements AZ::RHI::Allocator.
◆ GetAllocatedByteCount()
size_t AZ::RHI::FreeListAllocator::GetAllocatedByteCount |
( |
| ) |
const |
|
overridevirtual |
Returns the number of bytes used by the allocator. This includes allocations that are pending garbage collection.
Reimplemented from AZ::RHI::Allocator.
◆ GetAllocationCount()
size_t AZ::RHI::FreeListAllocator::GetAllocationCount |
( |
| ) |
const |
|
overridevirtual |
Returns the number of allocations active for this allocator. This includes allocations that are pending garbage collection.
Reimplemented from AZ::RHI::Allocator.
◆ GetDescriptor()
const Descriptor & AZ::RHI::FreeListAllocator::GetDescriptor |
( |
| ) |
const |
|
overridevirtual |
◆ Shutdown()
void AZ::RHI::FreeListAllocator::Shutdown |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file:
- Gems/Atom/RHI/Code/Include/Atom/RHI/FreeListAllocator.h