Navigation
API > API/Runtime > API/Runtime/RHI > API/Runtime/RHI/FGPUDefragAllocator
Description
Marks the specified chunk as 'allocated' and updates tracking variables. Splits the chunk if only a portion of it is allocated.
Marks the specified chunk as 'allocated' and updates tracking variables. Splits the chunk if only a portion of it is allocated.
| Name | AllocateChunk |
| Type | function |
| Header File | /Engine/Source/Runtime/RHI/Public/GPUDefragAllocator.h |
| Include Path | #include "GPUDefragAllocator.h" |
| Source | /Engine/Source/Runtime/RHI/Private/GPUDefragAllocator.cpp |
FMemoryChunk * AllocateChunk
(
FMemoryChunk * FreeChunk,
int64 AllocationSize,
bool bAsync,
bool bDoValidation
)
The memory chunk that was allocated (the original chunk could've been split).
Parameters
| Name | Remarks |
|---|---|
| FreeChunk | Chunk to allocate |
| AllocationSize | Number of uint8s to allocate |
| bAsync | If true, allows allocating from relocating chunks and maint32ains the free-list sort order. |
| FreeChunk | Chunk to allocate |
| AllocationSize | Number of bytes to allocate |
| bAsync | If true, allows allocating from relocating chunks and maintains the free-list sort order. |