L L4D2node

hunk_print_allocations

0x00240400 · 114 bytes · __cdecl

_ZL22hunk_print_allocationsRK8CCommand

Decompiled

undefined (1 param)

/* hunk_print_allocations(CCommand const&) */

void hunk_print_allocations(CCommand *param_1)

{
  int iVar1;
  int iVar2;
  
  Msg("Hunk allocations:\n");
  for (iVar2 = CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
               ::FirstInorder((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                               *)&g_HunkAllocationsByName); iVar2 != -1;
      iVar2 = CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
              ::NextInorder((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                             *)&g_HunkAllocationsByName,iVar2)) {
    iVar1 = DAT_003f2c84 + iVar2 * 0x18;
    Msg("    %55s:%10d\n",*(undefined4 *)(iVar1 + 0x10),*(undefined4 *)(iVar1 + 0x14));
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)