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...

 

MemoryProperties

Protected variable

uint32

 

NumAllocations

Protected variable

uint32

 

PeakNumAllocations

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
)

Public function

void

 

Deinit()

Public function

void

 

Free

(
    FDeviceMemoryAllocation*& Allo...
)

Sets the Allocation to nullptr.

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
)

Protected function

void

 

SetupAndPrintMemInfo()

Public function Const

bool

 

SupportsMemoryType

(
    VkMemoryPropertyFlags Properties
)

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