memory
0x0017c2b0 · 280 bytes · __cdecl
_ZL6memoryRK8CCommand
Decompiled
undefined (1 param)
/* memory(CCommand const&) */
void memory(CCommand *param_1)
{
int iVar1;
char *pcVar2;
int iVar3;
int iVar4;
float local_10;
iVar4 = 0;
ConMsg("\nVideo Memory Used:\n");
local_10 = 0.0;
while( true ) {
iVar1 = CVProfile::GetNumCounters();
if (iVar1 <= iVar4) break;
iVar1 = CVProfile::GetCounterGroup(0x40a01c);
if (iVar1 == 2) {
iVar1 = CVProfile::GetCounterValue(0x40a01c);
local_10 = local_10 + (float)iVar1 * 9.536743e-07;
pcVar2 = (char *)CVProfile::GetCounterName(0x40a01c);
iVar3 = V_strnicmp(pcVar2,"TexGroup_Global_",0x10);
if (iVar3 == 0) {
pcVar2 = pcVar2 + 0x10;
}
ConMsg("%5.2f MB: %s\n",(double)((float)iVar1 * 9.536743e-07),pcVar2);
}
iVar4 = iVar4 + 1;
}
ConMsg("------------------\n");
ConMsg("%5.2f MB: total\n",(double)local_10);
ConMsg("\nHunk Memory Used %s:\n",&DAT_003b7f70);
Hunk_Print();
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.