FMemory::TestMemory

A helper function that will perform a series of random heap allocations to test the internal validity of the heap.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

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

Include

#include "HAL/UnrealMemory.h"

Source

/Engine/Source/Runtime/Core/Private/HAL/UnrealMemory.cpp

Syntax

static void TestMemory()

Remarks

A helper function that will perform a series of random heap allocations to test the internal validity of the heap. Note, this function will "leak" memory, but another call will clean up previously allocated blocks before returning. This will help to A/B testing where you call it in a good state, do something to corrupt memory, then call this again and hopefully freeing some pointers will trigger a crash.