FDeviceMemoryManager

Manager of Device Heap Allocations. Calling Alloc/Free is expensive!

Windows
MacOS
Linux

References

Module

VulkanRHI

Header

/Engine/Source/Runtime/VulkanRHI/Public/VulkanMemory.h

Include

#include "VulkanMemory.h"

Syntax

class FDeviceMemoryManager

Remarks

Manager of Device Heap Allocations. Calling Alloc/Free is expensive!

Variables

Name Description

Protected variable

bool

 

bHasUnifiedMemory

Protected variable

FVulkanDevice &...

 

Device

Protected variable

VkDevice

 

DeviceHandle

Protected variable

TArray< FHeapIn...

 

HeapInfos

Protected variable

VkPhysicalDevic...

 

MemoryBudget

Protected variable

VkPhysicalDevic...

 

MemoryProperties

Protected variable

double

 

MemoryUpdateTime

Protected variable

uint32

 

NumAllocations

Protected variable

uint32

 

PeakNumAllocations

Protected variable

int32

 

PrimaryHostHeap

Constructors

Name Description

Public function

FDeviceMemoryManager()

Destructors

Name Description

Public function

~FDeviceMemoryManager()

Functions

Name Description

Public function

FDeviceMemor...

 

Alloc

(
    bool bCanFail,
    VkDeviceSize AllocationSize,
    uint32 MemoryTypeIndex,
    void* DedicatedAllocateInfo,
    float Priority,
    const char* File,
    uint32 Line
)

BCanFail means an allocation failing is not a fatal error, just returns nullptr

Public function

FDeviceMemor...

 

Alloc

(
    bool bCanFail,
    VkDeviceSize AllocationSize,
    uint32 MemoryTypeBits,
    VkMemoryPropertyFlags MemoryPropert...,
    void* DedicatedAllocateInfo,
    float Priority,
    const char* File,
    uint32 Line
)

BCanFail means an allocation failing is not a fatal error, just returns nullptr

Public function

void

 

Deinit()

Protected function

void

 

DumpMemory()

Public function

void

 

Free

(
    FDeviceMemoryAllocation*& Allo...
)

Sets the Allocation to nullptr.

Protected function

void

 

FreeInternal

(
    FDeviceMemoryAllocation* Alloc...
)

Public function Const

VkDeviceSize

 

GetBaseHeapSize

(
    uint32 HeapIndex
)

Public function

uint32

 

GetEvictedMemoryProperties()

Public function

uint32

 

GetHeapIndex

(
    uint32 MemoryTypeIndex
)

Public function

void

 

GetHostMemoryStatus

(
    uint64* Allocated,
    uint64* Total
)

Protected function

void

 

GetMemoryDump

(
    TArray< FResourceHeapStats >& OutD...
)

Public function Const

const VkPhys...

 

GetMemoryProperties()

Public function

VkResult

 

GetMemoryTypeFromProperties

(
    uint32 TypeBits,
    VkMemoryPropertyFlags Properties,
    uint32* OutTypeIndex
)

Public function

VkResult

 

GetMemoryTypeFromPropertiesExcluding

(
    uint32 TypeBits,
    VkMemoryPropertyFlags Properties,
    uint32 ExcludeTypeIndex,
    uint32* OutTypeIndex
)

Public function Const

uint32

 

GetNumMemoryTypes()

Public function Const

uint64

 

GetTotalMemory

(
    bool bGPU
)

Public function Const

bool

 

HasUnifiedMemory()

Public function

void

 

Init

(
    FVulkanDevice* InDevice
)

Public function Const

bool

 

IsHostMemory

(
    uint32 MemoryTypeIndex
)

Protected function

void

 

SetupAndPrintMemInfo()

Public function Const

bool

 

SupportsMemoryType

(
    VkMemoryPropertyFlags Properties
)

Protected function

void

 

TrimMemory

(
    bool bFullTrim
)

Classes

Name

Description

Protected struct

FHeapInfo

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss