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

Function logDumpTraverse

Engine/source/platform/platformMemory.cpp:868–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866};
867
868void logDumpTraverse(MemDumpLog *sizes, TreeNode *header, U32 depth)
869{
870 if(header == NIL)
871 return;
872 MemDumpLog *mySize = sizes;
873 while(mySize->size < header->size)
874 mySize++;
875
876 U32 cnt = 0;
877 for(FreeHeader *walk = header->queueHead; walk; walk = walk->nextQueue)
878 cnt++;
879 mySize->count += cnt;
880 mySize->depthTotal += depth * cnt;
881 mySize->maxDepth = depth > mySize->maxDepth ? depth : mySize->maxDepth;
882 mySize->minDepth = depth < mySize->minDepth ? depth : mySize->minDepth;
883 logDumpTraverse(sizes, header->left, depth + 1);
884 logDumpTraverse(sizes, header->right, depth + 1);
885}
886
887#ifdef TORQUE_DEBUG
888DefineEngineFunction( validateMemory, void, ( ),,

Callers 1

platformMemory.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected