FGenericPlatformMallocCrash::SetAsGMalloc

Sets as GMalloc.

Windows
MacOS
Linux

Warnings

  • This is not super safe, may interfere with other allocations, ie. replacing vtable during running the code from the previous malloc will probably crash other threads.

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMallocCrash.h

Include

#include "GenericPlatform/GenericPlatformMallocCrash.h"

Source

/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMallocCrash.cpp

Syntax

void SetAsGMalloc()

Remarks

Sets as GMalloc. This method locks to the thread that crashed. Any next calls to this method or GMalloc from other threads will dead-lock those threads, but this is ok, because we are shutting down. This also fixes a lot of potential issues of using dynamic allocation during crash dumping.

This is not super safe, may interfere with other allocations, ie. replacing vtable during running the code from the previous malloc will probably crash other threads.

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