Files
Sylpheed/docs/re/data
Sylpheed RE agent 2656ac0d8e re: the heap ledger refutes my own leak hypothesis
Built the allocation ledger to test the leak I proposed this morning, and it
refutes it.

  * No leak.  The books balance: 379.5 MB live in 84 blocks plus 113.2 MB free
    is 492.7 MB of the console's 512, with ~19 MB in allocation paths the filter
    did not capture.  Nothing is missing that a leak would explain.

  * The 22 "leaked" releases are correct refusals.  All 22 failing frees are
    interior pointers into ONE allocation -- the 58.5 MB block at BC220000, at
    offsets from 5 to 30 MB.  The game sub-allocates out of a physical pool and
    frees the sub-blocks.  BaseHeap::Release frees whole regions, so honouring
    an interior pointer would free 58.5 MB, twenty-two times over.  The fix I
    was moving toward would have been a catastrophe.

  * Rounding is not it either: 480.67 MB requested against 484.50 MB granted is
    3.83 MB (0.8%), versus a 14.84 MB shortfall.

What actually happens is a doubling grow that holds both buffers: allocate 32 MB,
free the previous, allocate 64 MB, free the 32, then ask for 128 MB while still
holding the 64.  That needs 192 MB live for one buffer on top of ~315 MB held
elsewhere, and comes up 14.84 MB short.

No configuration fixes it.  There is no guest memory-size cvar; the 512 MB is
baked into the address map rather than a constant (the aliases at 0xA0000000 and
0xC0000000 are spaced exactly 0x20000000 apart, so growing the heap runs one
window into the next); and this tree has no eh_dispatch cvar, so
RtlRaiseException routes the guest's OOM throw to HandleCppException, which logs
and returns without unwinding.  That fall-through is the freeze.

Also worth recording: log_mask DISABLES categories (Kernel=1, Apu=2, Cpu=4,
Gpu=8), so the --log_mask=13 used throughout this corpus has been running with
the kernel log switched off.

The oracle is NOT fixed.  Ledger committed as data/heap-ledger-stage01.txt.
2026-08-26 12:22:40 +00:00
..