MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / logAlloc

Function logAlloc

Engine/source/platform/platformMemory.cpp:1082–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080
1081#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
1082static void logAlloc(const AllocatedHeader* hdr, S32 memSize)
1083{
1084 FileStream fws;
1085 fws.open(gLogFilename, Torque::FS::File::ReadWrite);
1086 fws.setPosition(fws.getStreamSize());
1087
1088 char buffer[1024];
1089 dSprintf(buffer, 1023, "alloc: %s %d %d %d\r\n",
1090 hdr->fileName != NULL ? hdr->fileName : "Undetermined",
1091 hdr->line, memSize, hdr->allocNum);
1092 fws.write(dStrlen(buffer), buffer);
1093 fws.close();
1094}
1095#endif
1096
1097#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)

Callers 1

allocFunction · 0.85

Calls 7

dSprintfFunction · 0.85
dStrlenFunction · 0.50
openMethod · 0.45
setPositionMethod · 0.45
getStreamSizeMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected