MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / checkGuard

Function checkGuard

Engine/source/platform/platformMemory.cpp:288–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286#ifdef TORQUE_DEBUG_GUARD
287
288static bool checkGuard(Header *header, bool alloc)
289{
290 U32 guardVal = alloc ? AllocatedGuard : FreeGuard;
291 for(U32 i = 0; i < 4; i++)
292 if(header->preguard[i] != guardVal || header->postguard[i] != guardVal)
293 {
294 Platform::debugBreak();
295 return false;
296 }
297
298 return true;
299}
300
301#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
302static void setGuard(Header *header, bool alloc)

Callers 5

validateFunction · 0.85
treeInsertFunction · 0.85
treeRemoveFunction · 0.85
checkPtrFunction · 0.85
reallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected