engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 所有成员列表
FGPUDefragAllocator::FMemoryChunk类 参考

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.

构造及析构函数说明

◆ FMemoryChunk()

FGPUDefragAllocator::FMemoryChunk::FMemoryChunk ( uint8 *  InBase,
int64  InSize,
FGPUDefragAllocator &  InBestFitAllocator,
FMemoryChunk *&  ChunkToInsertAfter,
TStatId  InStat 
)
inline

Private constructor.

参数
InBasePointer to base of chunk
InSizeSize of chunk
ChunkToInsertAfterChunk to insert this after.
FirstFreeChunkReference to first free chunk Pointer.

成员函数说明

◆ Link()

void FGPUDefragAllocator::FMemoryChunk::Link ( FMemoryChunk *&  ChunkToInsertAfter)
inline

Inserts this chunk after the passed in one.

参数
ChunkToInsertAfterChunk to insert after

◆ SetSyncIndex()

void FGPUDefragAllocator::FMemoryChunk::SetSyncIndex ( uint32  InSyncIndex,
int64  InSyncSize 
)
inline

Sets the relocation sync index.

参数
InSyncIndexGPU synchronization identifier that can be compared with BestFitAllocator::CompletedSyncIndex
InSyncSizeNumber of uint8s that require GPU synchronization (starting from the beginning of the chunk)

◆ UnlinkFree()

void FGPUDefragAllocator::FMemoryChunk::UnlinkFree ( )
inline

Removes itself for linked "free" list.

Maint32ains the free-list order.

类成员变量说明

◆ Base

uint8* FGPUDefragAllocator::FMemoryChunk::Base

Base of chunk.


◆ bIsAvailable

bool FGPUDefragAllocator::FMemoryChunk::bIsAvailable

Whether the chunk is available.


◆ DefragCounter

uint16 FGPUDefragAllocator::FMemoryChunk::DefragCounter

Defrag counter.

If this chunk failed to defrag, it won't try it again until the counter is 0.

◆ LockCount

int32 FGPUDefragAllocator::FMemoryChunk::LockCount

Whether the chunk has been locked.


◆ NextChunk

FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::NextChunk

Pointer to next chunk.


◆ NextFreeChunk

FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::NextFreeChunk

Pointer to next free chunk.


◆ PreviousChunk

FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousChunk

Pointer to previous chunk.


◆ PreviousFreeChunk

FMemoryChunk* FGPUDefragAllocator::FMemoryChunk::PreviousFreeChunk

Pointer to previous free chunk.


◆ Size

int64 FGPUDefragAllocator::FMemoryChunk::Size

Size of chunk.


◆ UserPayload

void* FGPUDefragAllocator::FMemoryChunk::UserPayload

User payload, e.g.

platform-specific texture Pointer. Only chunks with payload can be relocated.


该类的文档由以下文件生成: