Navigation
API > API/Runtime > API/Runtime/RHICore
References
| Module | RHICore |
| Header | /Engine/Source/Runtime/RHICore/Public/RHIPoolAllocator.h |
| Include | #include "RHIPoolAllocator.h" |
Syntax
class FRHIPoolAllocator
Remarks
Manages an array of FRHIMemoryPool and supports defragmentation between multiple pools
Variables
| Type | Name | Description | |
|---|---|---|---|
| const bool | bDefragEnabled | ||
| FCriticalSection | CS | Critical section to lock access to the pools. | |
| const uint64 | DefaultPoolSize | Const creation members - used to create new pools. | |
| const FRHIMemoryPool::EFreeListOrder | FreeListOrder | ||
| int32 | LastDefragPoolIndex | Last defrag pool index - defrag is time slices to reduce CPU overhead. | |
| const uint64 | MaxAllocationSize | ||
| const uint32 | PoolAlignment | ||
| TArray< uint32 > | PoolAllocationOrder | Allocation order of the pools when performing new allocations Can' sort the pools directly because pool index is stored in the allocation info | |
| TArray< FRHIMemoryPool * > | Pools | Actual pools managing each a linked list of allocations. | |
| uint32 | TotalAllocatedBlocks | Stats. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FRHIPoolAllocator
(
uint64 InDefaultPoolSize, |
Constructor. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FRHIMemoryPool * | CreateNewPool
(
int16 InPoolIndex, |
Helper function to create a new platform specific pool. | |
| void | DeallocateInternal
(
FRHIPoolAllocationData& AllocationData |
||
| void | Defrag
(
FRHICommandListBase& RHICmdList, |
Defrag & cleanup operation. | |
| void | Destroy () |
||
| bool | HandleDefragRequest
(
FRHICommandListBase& RHICmdList, |
||
| void | Initialize () |
Setup/Shutdown. | |
| bool | TryAllocateInternal
(
uint32 InSizeInBytes, |
Supported allocator operations. | |
| void | Stats. |