![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GPUDefragAllocator.h>
Public Member Functions | |
| FMemoryChunk (uint8 *InBase, int64 InSize, FGPUDefragAllocator &InBestFitAllocator, FMemoryChunk *&ChunkToInsertAfter, TStatId InStat) | |
| ~FMemoryChunk () | |
| bool | IsLocked () const |
| void | Link (FMemoryChunk *&ChunkToInsertAfter) |
| void | LinkFree (FMemoryChunk *FirstFreeChunkToSearch) |
| void | Unlink () |
| void | UnlinkFree () |
| bool | IsRelocating () const |
| int64 | GetAvailableSize () const |
| int64 | GetFinalSize () const |
| void | SetSyncIndex (uint32 InSyncIndex, int64 InSyncSize) |
| uint32 | GetSyncIndex () const |
Static Public Member Functions | |
| static uint64 | Compare (const FMemoryChunk *A, const FMemoryChunk *B) |
Contains information of a single allocation or free block.
|
inline |
Private constructor.
| InBase | Pointer to base of chunk |
| InSize | Size of chunk |
| ChunkToInsertAfter | Chunk to insert this after. |
| FirstFreeChunk | Reference to first free chunk Pointer. |
|
inline |
Unlinks/ removes the chunk from the linked lists it belongs to.
|
inlinestatic |
Comparison function for Sort(), etc, based on increasing base address.
|
inline |
Returns the number of uint8s that can be allocated from this chunk.
|
inline |
Returns the current size (in uint8s), or the final size if it has a reallocating request.
|
inline |
Returns the relocation sync index.
|
inline |
|
inline |
Returns true if the Chunk is being asynchronously relocated due to reallocation or defrag.
|
inline |
Inserts this chunk after the passed in one.
| ChunkToInsertAfter | Chunk to insert after |
| void FGPUDefragAllocator::FMemoryChunk::LinkFree | ( | FMemoryChunk * | FirstFreeChunkToSearch | ) |
Inserts this chunk at the head of the free chunk list.
Inserts this chunk at the head of the free chunk list. If bMaintainSortOrder is true, insert-sort this chunk into the free chunk list.
|
inline |
Sets the relocation sync index.
| InSyncIndex | GPU synchronization identifier that can be compared with BestFitAllocator::CompletedSyncIndex |
| InSyncSize | Number of uint8s that require GPU synchronization (starting from the beginning of the chunk) |
|
inline |
Removes itself for linked list.
|
inline |
Removes itself for linked "free" list. Maint32ains the free-list order.
| uint8* FGPUDefragAllocator::FMemoryChunk::Base |
Base of chunk.
| FGPUDefragAllocator& FGPUDefragAllocator::FMemoryChunk::BestFitAllocator |
Allows access to FBestFitAllocator members such as FirstChunk, FirstFreeChunk and LastChunk.
| bool FGPUDefragAllocator::FMemoryChunk::bIsAvailable |
Whether the chunk is available.
| bool FGPUDefragAllocator::FMemoryChunk::bTail |
| uint16 FGPUDefragAllocator::FMemoryChunk::DefragCounter |
Defrag counter. If this chunk failed to defrag, it won't try it again until the counter is 0.
| int32 FGPUDefragAllocator::FMemoryChunk::LockCount |
Whether the chunk has been locked.
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::NextChunk |
Pointer to next chunk.
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::NextFreeChunk |
Pointer to next free chunk.
| int64 FGPUDefragAllocator::FMemoryChunk::OrigSize |
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousChunk |
Pointer to previous chunk.
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousFreeChunk |
Pointer to previous free chunk.
| int64 FGPUDefragAllocator::FMemoryChunk::Size |
Size of chunk.
| TStatId FGPUDefragAllocator::FMemoryChunk::Stat |
| uint32 FGPUDefragAllocator::FMemoryChunk::SyncIndex |
SyncIndex that must be exceeded before accessing the data within this chunk.
| int64 FGPUDefragAllocator::FMemoryChunk::SyncSize |
Number of uint8s covered by the SyncIndex (starting from the beginning of the chunk).
| void* FGPUDefragAllocator::FMemoryChunk::UserPayload |
User payload, e.g. platform-specific texture Pointer. Only chunks with payload can be relocated.