FResourceSizeEx

Struct used to count up the amount of memory used by a resource.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/ProfilingDebugging/ResourceSize.h

Include

#include "ProfilingDebugging/ResourceSize.h"

Syntax

struct FResourceSizeEx

Remarks

Struct used to count up the amount of memory used by a resource. This is typically used for assets via UObject::GetResourceSizeEx.

Constructors

Name Description

Public function

FResourceSizeEx()

Default constructor.

Public function

FResourceSizeEx

(
    const EResourceSizeMode::Type InRes...
)

Construct using a given mode.

Public function

FResourceSizeEx

(
    const EResourceSizeMode::Type InRes...,
    const SIZE_T InUnknownMemoryBytes
)

Construct from legacy unknown size. Deliberately explicit to avoid accidental use.

Public function

FResourceSizeEx

(
    const EResourceSizeMode::Type InRes...,
    const SIZE_T InDedicatedSystemMemor...,
    const SIZE_T InSharedSystemMemoryBy...,
    const SIZE_T InDedicatedVideoMemory...,
    const SIZE_T InSharedVideoMemoryByt...
)

Construct from known sizes.

Functions

Name Description

Public function

FResourceSiz...

 

AddDedicatedSystemMemoryBytes

(
    const SIZE_T InMemoryBytes
)

Add the given number of bytes to the dedicated system memory count.

Public function

FResourceSiz...

 

AddDedicatedVideoMemoryBytes

(
    const SIZE_T InMemoryBytes
)

Add the given number of bytes to the dedicated video memory count.

Public function

FResourceSiz...

 

AddSharedSystemMemoryBytes

(
    const SIZE_T InMemoryBytes
)

Add the given number of bytes to the shared system memory count.

Public function

FResourceSiz...

 

AddSharedVideoMemoryBytes

(
    const SIZE_T InMemoryBytes
)

Add the given number of bytes to the shared video memory count.

Public function

FResourceSiz...

 

AddUnknownMemoryBytes

(
    const SIZE_T InMemoryBytes
)

Add the given number of bytes to the unknown memory count.

Public function Const

SIZE_T

 

GetDedicatedSystemMemoryBytes()

Get the number of bytes allocated from dedicated system memory.

Public function Const

SIZE_T

 

GetDedicatedVideoMemoryBytes()

Get the number of bytes allocated from dedicated video memory.

Public function Const

EResourceSiz...

 

GetResourceSizeMode()

Get the type of resource size held in this struct.

Public function Const

SIZE_T

 

GetSharedSystemMemoryBytes()

Get the number of bytes allocated from shared system memory.

Public function Const

SIZE_T

 

GetSharedVideoMemoryBytes()

Get the number of bytes allocated from shared video memory.

Public function Const

SIZE_T

 

GetTotalMemoryBytes()

Get the total number of bytes allocated from any memory.

Public function Const

SIZE_T

 

GetUnknownMemoryBytes()

Get the number of bytes allocated from unknown memory.

Operators

Name Description

Public function

FResourceSiz...

 

operator+=

(
    const FResourceSizeEx& InRHS
)

Add another FResourceSizeEx to this one.

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