Contains information of a single allocation or free block. 更多...
#include <GPUDefragAllocator.h>
Public 成员函数 | |
| FMemoryChunk (uint8 *InBase, int64 InSize, FGPUDefragAllocator &InBestFitAllocator, FMemoryChunk *&ChunkToInsertAfter, TStatId InStat) | |
| Private constructor. 更多... | |
| int64 | GetAvailableSize () const |
| Returns the number of uint8s that can be allocated from this chunk. | |
| int64 | GetFinalSize () const |
| Returns the current size (in uint8s), or the final size if it has a reallocating request. | |
| uint32 | GetSyncIndex () const |
| Returns the relocation sync index. | |
| bool | IsRelocating () const |
| Returns true if the Chunk is being asynchronously relocated due to reallocation or defrag. | |
| void | Link (FMemoryChunk *&ChunkToInsertAfter) |
| Inserts this chunk after the passed in one. 更多... | |
| void | LinkFree (FMemoryChunk *FirstFreeChunkToSearch) |
| Inserts this chunk at the head of the free chunk list. | |
| void | SetSyncIndex (uint32 InSyncIndex, int64 InSyncSize) |
| Sets the relocation sync index. 更多... | |
| void | Unlink () |
| Removes itself for linked list. | |
| void | UnlinkFree () |
| Removes itself for linked "free" list. 更多... | |
| ~FMemoryChunk () | |
| Unlinks/ removes the chunk from the linked lists it belongs to. | |
静态 Public 成员函数 | |
| static uint64 | Compare (const FMemoryChunk *A, const FMemoryChunk *B) |
| Comparison function for Sort(), etc, based on increasing base address. | |
Public 属性 | |
| uint8 * | Base |
| Base of chunk. 更多... | |
| FGPUDefragAllocator & | BestFitAllocator |
| Allows access to FBestFitAllocator members such as FirstChunk, FirstFreeChunk and LastChunk. | |
| bool | bIsAvailable |
| Whether the chunk is available. 更多... | |
| uint16 | DefragCounter |
| Defrag counter. 更多... | |
| int32 | LockCount |
| Whether the chunk has been locked. 更多... | |
| FMemoryChunk * | NextChunk |
| Pointer to next chunk. 更多... | |
| FMemoryChunk * | NextFreeChunk |
| Pointer to next free chunk. 更多... | |
| FMemoryChunk * | PreviousChunk |
| Pointer to previous chunk. 更多... | |
| FMemoryChunk * | PreviousFreeChunk |
| Pointer to previous free chunk. 更多... | |
| int64 | Size |
| Size of chunk. 更多... | |
| uint32 | SyncIndex |
| SyncIndex that must be exceeded before accessing the data within this chunk. | |
| int64 | SyncSize |
| Number of uint8s covered by the SyncIndex (starting from the beginning of the chunk). | |
| void * | UserPayload |
| User payload, e.g. 更多... | |
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 |
Inserts this chunk after the passed in one.
| ChunkToInsertAfter | Chunk to insert after |
|
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 "free" list.
Maint32ains the free-list order.
| uint8* FGPUDefragAllocator::FMemoryChunk::Base |
Base of chunk.
| bool FGPUDefragAllocator::FMemoryChunk::bIsAvailable |
Whether the chunk is available.
| 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.
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousChunk |
Pointer to previous chunk.
| FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousFreeChunk |
Pointer to previous free chunk.
| int64 FGPUDefragAllocator::FMemoryChunk::Size |
Size of chunk.
| void* FGPUDefragAllocator::FMemoryChunk::UserPayload |
User payload, e.g.
platform-specific texture Pointer. Only chunks with payload can be relocated.