Skip to content

EntropyEngine::Core::EntropyObjectMemoryHooks

EntropyEngine::Core::EntropyObjectMemoryHooks

Section titled “EntropyEngine::Core::EntropyObjectMemoryHooks”

Memory profiling callbacks for EntropyObject lifecycle tracking. More…

#include <EntropyObject.h>

Name
using void(*)(void *ptr, const char *className)FreeCallback
using void(*)(void *ptr, size_t size, const char *className)AllocCallback
Name
FreeCallbackonFree
AllocCallbackonAlloc
struct EntropyEngine::Core::EntropyObjectMemoryHooks;

Memory profiling callbacks for EntropyObject lifecycle tracking.

These callbacks allow external profilers (e.g., Tracy) to track EntropyObject allocations without adding profiler dependencies to EntropyCore.

// Example: Register Tracy callbacks in EntropyPortal
EntropyObjectMemoryHooks::onAlloc = [](void* ptr, size_t size, const char* name) {
TracyAllocN(ptr, size, name);
};
EntropyObjectMemoryHooks::onFree = [](void* ptr, const char* name) {
TracyFreeN(ptr, name);
};
using EntropyEngine::Core::EntropyObjectMemoryHooks::FreeCallback = void (*)(void* ptr, const char* className);
using EntropyEngine::Core::EntropyObjectMemoryHooks::AllocCallback = void (*)(void* ptr, size_t size, const char* className);
static FreeCallback onFree = nullptr;
static AllocCallback onAlloc = nullptr;

Updated on 2026-01-26 at 17:14:35 -0500