Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitlather/71ff86664a4bbc287b47a37aee47d67f to your computer and use it in GitHub Desktop.
Save bitlather/71ff86664a4bbc287b47a37aee47d67f to your computer and use it in GitHub Desktop.
Data structure memory leak logs

Here's an example "concise log" that's written to a file every time a room loads or I call a function to dump this information:

   # |                                               ROOM |                  MAPS |                 LISTS |                STACKS |                 GRIDS |                QUEUES |            PRIORITIES |                 PATHS |                VBUFFS | 
   1 |           se_initialize_tile_palette_to_color_room | (        )        475 | (        )          9 | (        )          1 | (        )          8 | (        )          0 | (        )          0 | (        )          0 | (        )          0 | 
   2 |                               se_stage_editor_room | (   +1128)       1603 | (    +364)        373 | (      +2)          3 | (    +880)        888 | (      +3)          3 | (        )          0 | (        )          0 | (        )          0 | 
   3 |                                        render_room | (    +114)       1717 | (      -2)        371 | (      -2)          1 | (      +2)        890 | (      -3)          0 | (        )          0 | (        )          0 | (      +4)          4 | 
   4 |                               se_stage_editor_room | (      +7)       1724 | (      +4)        375 | (        )          1 | (      -2)        888 | (      +3)          3 | (        )          0 | (        )          0 | (      -4)          0 | 

Each data structure has its own folder with more information.

For example, there's a lists directory with files name 1.txt, 2.txt, 3.txt, and 4.txt, which coincide with the number from the table above.

Their contents look like this:

Room: se_stage_editor_room
Object: Debug

        ID - NAME
         0 - GlobalInitializer: (used by GameMaker or an extension)
         1 - GlobalInitializer: (used by GameMaker or an extension)
         2 - GlobalInitializer: (used by GameMaker or an extension)
         3 - GlobalInitializer: (used by GameMaker or an extension)
         4 - GlobalInitializer: (used by GameMaker or an extension)
         5 - GlobalInitializer: (used by GameMaker or an extension)
         6 - GlobalInitializer: (used by GameMaker or an extension)
         7 - GlobalInitializer: (used by GameMaker or an extension)
         8 - GlobalInitializer: (used by GameMaker or an extension)
         9 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.54
        10 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.94
        11 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.90
        12 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.75
        13 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.73
        14 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.96
        15 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.98
        16 - SE_TilesetScraper: global.se_tile_to_thumbnail_colors_map.floor_tileset.108
...etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment