FResourceSizeEx

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

Choose your operating system:

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

Construct from known sizes.

Functions

Name Description

Public function

FResourceSiz...

 

AddDedicatedSystemMemoryBytes

(
    const FName& Tag,
    const SIZE_T InMemoryBytes
)

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 FName& Tag,
    const SIZE_T InMemoryBytes
)

Public function

FResourceSiz...

 

AddDedicatedVideoMemoryBytes

(
    const SIZE_T InMemoryBytes
)

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

Public function

FResourceSiz...

 

AddUnknownMemoryBytes

(
    const FName& Tag,
    const SIZE_T InMemoryBytes
)

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

 

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.

Public function Const

void

 

LogSummary

(
    FOutputDevice& Ar
)

Operators

Name Description

Public function

FResourceSiz...

 

operator+=

(
    const FResourceSizeEx& InRHS
)

Add another FResourceSizeEx to this one.