FMallocThreadSafeProxy

[FMalloc](API\Runtime\Core\HAL\FMalloc) proxy that synchronizes access, making the used malloc thread safe.

Windows
MacOS
Linux

Inheritance Hierarchy

FUseSystemMallocForNew

FExec

FMalloc

FMallocThreadSafeProxy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/MallocThreadSafeProxy.h

Include

#include "HAL/MallocThreadSafeProxy.h"

Syntax

class FMallocThreadSafeProxy : public FMalloc

Remarks

FMalloc proxy that synchronizes access, making the used malloc thread safe.

Constructors

Name Description

Public function

FMallocThreadSafeProxy

(
    FMalloc* InMalloc
)

Constructor for thread safe proxy malloc that takes a malloc to be used and a synchronization object used via FScopeLock as a parameter.

Overridden from FMalloc

Name Description

Public function Virtual

void

 

DumpAllocatorStats

(
    FOutputDevice& Ar
)

Dumps allocator stats to an output device.

Public function Virtual

void

 

Free

(
    void* Ptr
)

Free

Public function Virtual

bool

 

GetAllocationSize

(
    void* Original,
    SIZE_T& SizeOut
)

If possible determine the size of the memory allocated at the given address

Public function Virtual

void

 

GetAllocatorStats

(
    FGenericMemoryStats& out_Stats
)

Writes allocator stats from the last update into the specified destination.

Public function Virtual

const TCHAR ...

 

GetDescriptiveName()

Gets descriptive name for logging purposes.

Public function Virtual

void

 

InitializeStatsMetadata()

Initializes stats metadata.

Public function Virtual Const

bool

 

IsInternallyThreadSafe()

Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it.

Public function Virtual

void *

 

Malloc

(
    SIZE_T Size,
    uint32 Alignment
)

Malloc

Public function Virtual

void *

 

Realloc

(
    void* Ptr,
    SIZE_T NewSize,
    uint32 Alignment
)

Realloc

Public function Virtual

void

 

Trim

(
    bool bTrimThreadCaches
)

Releases as much memory as possible. Must be called from the main thread.

Public function Virtual

bool

 

ValidateHeap()

Validates the allocator's heap

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

(
    UWorld* InWorld,
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Handles any commands passed in on the command line

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