mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
UpdateAddOnMemoryUsage summed Gc::Tag::SizeOf over the keys of the tag map. That is only safe while every free reaches luaC_freeobj (0x006F7260), whose co-hook erases the key. wow_turbo replaces luaC_collectgarbage (0x006F7340) with a parallel sweep that frees strings, tables, closures, userdata and upvalues itself and sends only threads and protos through freeobj. Dead keys stayed in the map, and the recount read freed blocks: crash 132. The recount now walks the lists the engine sweeps: rootgc (G+0x10), rootudata (G+0x14) and every string-table bucket (G+0x04, size G+0x0C), and looks up the tag of each live object. 3.3.5's luaC_sizeall walks the same lists. A create with no context word now erases its address's entry, so a reused address never carries a dead object's tag, whoever freed it. Dead entries a foreign sweep leaves are never read, and the pool's address reuse bounds them. _classicapi_LuaHeapAudit uses the same walk. Fixes #120