UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FD3D12BuddyAllocator Class Reference

#include <D3D12Allocation.h>

+ Inheritance diagram for FD3D12BuddyAllocator:

Public Member Functions

 FD3D12BuddyAllocator (FD3D12Device *ParentDevice, FRHIGPUMask VisibleNodes, const FD3D12ResourceInitConfig &InInitConfig, const FString &Name, EResourceAllocationStrategy InAllocationStrategy, uint32 MaxSizeForPooling, uint32 InMaxBlockSize, uint32 InMinBlockSize, HeapId InTraceParentHeapId)
 
bool TryAllocate (uint32 SizeInBytes, uint32 Alignment, FD3D12ResourceLocation &ResourceLocation)
 
void Deallocate (FD3D12ResourceLocation &ResourceLocation)
 
void Initialize ()
 
void Destroy ()
 
void CleanUpAllocations ()
 
void DumpAllocatorStats (class FOutputDevice &Ar)
 
void UpdateMemoryStats (uint32 &IOMemoryAllocated, uint32 &IOMemoryUsed, uint32 &IOMemoryFree, uint32 &IOAlignmentWaste, uint32 &IOAllocatedPageCount, uint32 &IOFullPageCount)
 
void ReleaseAllResources ()
 
void Reset ()
 
bool IsEmpty ()
 
uint64 GetLastUsedFrameFence () const
 
uint32 GetTotalSizeUsed () const
 
uint64 GetAllocationOffsetInBytes (const FD3D12BuddyAllocatorPrivateData &AllocatorPrivateData) const
 
FD3D12HeapGetBackingHeap ()
 
bool IsOwner (FD3D12ResourceLocation &ResourceLocation)
 
- Public Member Functions inherited from FD3D12ResourceAllocator
 FD3D12ResourceAllocator (FD3D12Device *ParentDevice, FRHIGPUMask VisibleNodes, const FD3D12ResourceInitConfig &InInitConfig, const FString &Name, uint32 MaxSizeForPooling)
 
 ~FD3D12ResourceAllocator ()
 
const FD3D12ResourceInitConfigGetInitConfig () const
 
const uint32 GetMaximumAllocationSizeForPooling () const
 
- Public Member Functions inherited from FD3D12DeviceChild
 FD3D12DeviceChild (FD3D12Device *InParent=nullptr)
 
FORCEINLINE FD3D12DeviceGetParentDevice () const
 
FD3D12DeviceGetParentDevice_Unsafe () const
 
- Public Member Functions inherited from FD3D12MultiNodeGPUObject
 FD3D12MultiNodeGPUObject (FRHIGPUMask NodeMask, FRHIGPUMask VisibiltyMask)
 
- Public Member Functions inherited from FD3D12GPUObject
 FD3D12GPUObject (FRHIGPUMask InGPUMask, FRHIGPUMask InVisibiltyMask)
 
SGPU_CONSTEXPR FRHIGPUMask GetGPUMask () const
 
SGPU_CONSTEXPR FRHIGPUMask GetVisibilityMask () const
 

Protected Attributes

const uint32 MaxBlockSize
 
const uint32 MinBlockSize
 
const EResourceAllocationStrategy AllocationStrategy
 
TRefCountPtr< FD3D12ResourceBackingResource
 
TRefCountPtr< FD3D12HeapBackingHeap
 
- Protected Attributes inherited from FD3D12ResourceAllocator
const FD3D12ResourceInitConfig InitConfig
 
const FString DebugName
 
bool Initialized
 
const uint32 MaximumAllocationSizeForPooling
 
FCriticalSection CS
 
uint32 SpaceAlignedUsed
 
uint32 SpaceActualUsed
 
uint32 NumBlocksInDeferredDeletionQueue
 
uint32 PeakUsage
 
uint32 FailedAllocationSpace
 
- Protected Attributes inherited from FD3D12DeviceChild
FD3D12DeviceParent
 

Constructor & Destructor Documentation

◆ FD3D12BuddyAllocator()

FD3D12BuddyAllocator::FD3D12BuddyAllocator ( FD3D12Device ParentDevice,
FRHIGPUMask  VisibleNodes,
const FD3D12ResourceInitConfig InInitConfig,
const FString &  Name,
EResourceAllocationStrategy  InAllocationStrategy,
uint32  MaxSizeForPooling,
uint32  InMaxBlockSize,
uint32  InMinBlockSize,
HeapId  InTraceParentHeapId 
)

Member Function Documentation

◆ CleanUpAllocations()

void FD3D12BuddyAllocator::CleanUpAllocations ( )

◆ Deallocate()

void FD3D12BuddyAllocator::Deallocate ( FD3D12ResourceLocation ResourceLocation)

◆ Destroy()

void FD3D12BuddyAllocator::Destroy ( )

◆ DumpAllocatorStats()

void FD3D12BuddyAllocator::DumpAllocatorStats ( class FOutputDevice Ar)

◆ GetAllocationOffsetInBytes()

uint64 FD3D12BuddyAllocator::GetAllocationOffsetInBytes ( const FD3D12BuddyAllocatorPrivateData AllocatorPrivateData) const
inline

◆ GetBackingHeap()

FD3D12Heap * FD3D12BuddyAllocator::GetBackingHeap ( )
inline

◆ GetLastUsedFrameFence()

uint64 FD3D12BuddyAllocator::GetLastUsedFrameFence ( ) const
inline

◆ GetTotalSizeUsed()

uint32 FD3D12BuddyAllocator::GetTotalSizeUsed ( ) const
inline

◆ Initialize()

void FD3D12BuddyAllocator::Initialize ( )

◆ IsEmpty()

bool FD3D12BuddyAllocator::IsEmpty ( )
inline

◆ IsOwner()

bool FD3D12BuddyAllocator::IsOwner ( FD3D12ResourceLocation ResourceLocation)
inline

◆ ReleaseAllResources()

void FD3D12BuddyAllocator::ReleaseAllResources ( )

◆ Reset()

void FD3D12BuddyAllocator::Reset ( )

◆ TryAllocate()

bool FD3D12BuddyAllocator::TryAllocate ( uint32  SizeInBytes,
uint32  Alignment,
FD3D12ResourceLocation ResourceLocation 
)

◆ UpdateMemoryStats()

void FD3D12BuddyAllocator::UpdateMemoryStats ( uint32 IOMemoryAllocated,
uint32 IOMemoryUsed,
uint32 IOMemoryFree,
uint32 IOAlignmentWaste,
uint32 IOAllocatedPageCount,
uint32 IOFullPageCount 
)

Member Data Documentation

◆ AllocationStrategy

const EResourceAllocationStrategy FD3D12BuddyAllocator::AllocationStrategy
protected

◆ BackingHeap

TRefCountPtr<FD3D12Heap> FD3D12BuddyAllocator::BackingHeap
protected

◆ BackingResource

TRefCountPtr<FD3D12Resource> FD3D12BuddyAllocator::BackingResource
protected

◆ MaxBlockSize

const uint32 FD3D12BuddyAllocator::MaxBlockSize
protected

◆ MinBlockSize

const uint32 FD3D12BuddyAllocator::MinBlockSize
protected

The documentation for this class was generated from the following files: