MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / out_of_memory_handler

Function out_of_memory_handler

ogsr_engine/xrCore/xrDebugNew.cpp:269–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269static int out_of_memory_handler(size_t size)
270{
271 //Memory.mem_compact();
272 size_t process_heap = mem_usage_impl(nullptr, nullptr);
273 u32 eco_strings = g_pStringContainer->stat_economy();
274 u32 eco_smem = g_pSharedMemoryContainer->stat_economy();
275 Msg("* [x-ray]: process heap[%d K]", process_heap / 1024);
276 Msg("* [x-ray]: economy: strings[%d K], smem[%d K]", eco_strings / 1024, eco_smem);
277 FATAL("Out of memory. Memory request: [%d K]", size / 1024);
278 return 1;
279}
280
281#ifdef USE_OWN_MINI_DUMP
282#pragma warning(push)

Callers

nothing calls this directly

Calls 3

mem_usage_implFunction · 0.85
MsgFunction · 0.85
stat_economyMethod · 0.45

Tested by

no test coverage detected