/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMallocCrash.h
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.
void SetAsGMalloc()