MCPcopy Create free account
hub / github.com/DavidColson/Polybox / LuaAllocator

Function LuaAllocator

source/cpu.cpp:342–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340// ***********************************************************************
341
342static void* LuaAllocator(void* ud, void* ptr, size_t osize, size_t nsize) {
343 // TODO: lua VM memory tracking?
344 if (nsize == 0) {
345 if (ptr)
346 RawFree(ptr);
347 return nullptr;
348 } else {
349 return RawRealloc(ptr, nsize, osize, true);
350 }
351}
352
353// ***********************************************************************
354

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected