Symptom
CLAUDE.md's Memory layout / Known issues sections state three memory-margin
figures. All three are wrong against a current build, and the one that matters
most is overstated by 2.25x — in the direction that makes a full region look
like it has room.
Measured 2026-09-05 from origin/master at dc06095, both shipped UCI
products, from build/c64-https.map:
BACKEND=uci USE_NISTCURVES_ONCHIP=1 -> cfg/c64-https-uci.cfg
PRG 5f9e9fb9e70edd2a15ab2249120f161d1826262140fa6ce6f3e01410a876b474
BACKEND=uci USE_NISTCURVES_ONCHIP_COMB=1 -> cfg/c64-https-uci-onchip.cfg
PRG c423476011e1928f5955e4773c3cf28c4876dcf76e70be9de40c2f4522f8bf72
| CLAUDE.md |
claim |
measured onchip |
measured comb |
:427 |
"CRYPTO_HOT margin under UCI is 81 B at v0.9.1+" |
36 B |
193 B |
:424 |
"server-name validation took the comb tail from 714 to 223 B" |
— |
159 B |
:558 |
"comb adds RODATA/LIMLEE_BSS (~223 B tail free)" |
— |
159 B |
CRYPTO_HOT is the sharp one. 36 B is the tightest margin in the tree —
tighter than NET_BSS_TAIL's 43 B, tighter than NET_CODE's 67 B — and
CLAUDE.md says 81 B. Note also that 81 B matches neither profile: the two
cfgs give CRYPTO_HOT very different occupancy (36 B vs 193 B, because the
comb cfg moves all the rodata out to CRYPTO_OVERLAY), so a single
backend-wide figure cannot be right whatever its value. Same for the overlay
tail, quoted twice at 223 B and measured at 159 B under comb and 2,035 B under
onchip.
Why it matters
CRYPTO_HOT overflow is a documented, expensive failure. CLAUDE.md itself says
the margin "was one byte at v0.6.0" and to "watch it on every pin bump", and
#149 overflowed the neighbouring NET_CODE by 35 B and cost the UCI backend
entirely. Someone sizing a change against 81 B when there are 36 has 45 bytes
of imaginary headroom in the region that is hardest to grow.
To re-measure:
make clean && make BACKEND=uci USE_NISTCURVES_ONCHIP=1
awk '/^Segment list:/,0' build/c64-https.map
Last used address per region, minus the region end, is the tail. Full tables
for both products are now in the cfg headers (PR #188): each cfg carries a
dated, profile-tagged, PRG-hash-stamped Measured region occupancy block, and
those blocks are the natural thing for CLAUDE.md to point at.
Suggested fix
Per #161's rule — would this copy change if the fact did? — a byte count in
CLAUDE.md answers no, and there are now two cfg blocks that carry the same
facts next to the SEGMENTS lines that produce them. So prefer deleting
the three figures over refreshing them:
:427 → say CRYPTO_HOT is the tightest region under UCI and that the
margin is profile-dependent, pointing at the occupancy block in the cfg
the profile actually links. Keep "watch it on every pin bump".
:424 and :558 → drop the 223 B; :424's point (a new resident tenant
shrinks what the rigs' MemoryArbiter can hand out, and broke
rig_https_wiki.py) survives intact without a number, and tools/uci/_memory_policy.py
already reads build/labels.txt rather than any written figure.
Notes
Found while measuring for #170 (PR #188) and confirmed independently by
adversarial review. Deliberately not folded into #188 — that PR is
comment-only inside cfg/, verified PRG-neutral, and other lanes are editing
CLAUDE.md concurrently. Filing rather than editing for the same reason.
Symptom
CLAUDE.md's Memory layout / Known issues sections state three memory-margin
figures. All three are wrong against a current build, and the one that matters
most is overstated by 2.25x — in the direction that makes a full region look
like it has room.
Measured 2026-09-05 from
origin/masteratdc06095, both shipped UCIproducts, from
build/c64-https.map::427CRYPTO_HOTmargin under UCI is 81 B at v0.9.1+":424:558CRYPTO_HOTis the sharp one. 36 B is the tightest margin in the tree —tighter than
NET_BSS_TAIL's 43 B, tighter thanNET_CODE's 67 B — andCLAUDE.md says 81 B. Note also that 81 B matches neither profile: the two
cfgs give
CRYPTO_HOTvery different occupancy (36 B vs 193 B, because thecomb cfg moves all the rodata out to
CRYPTO_OVERLAY), so a singlebackend-wide figure cannot be right whatever its value. Same for the overlay
tail, quoted twice at 223 B and measured at 159 B under comb and 2,035 B under
onchip.
Why it matters
CRYPTO_HOToverflow is a documented, expensive failure. CLAUDE.md itself saysthe margin "was one byte at v0.6.0" and to "watch it on every pin bump", and
#149overflowed the neighbouringNET_CODEby 35 B and cost the UCI backendentirely. Someone sizing a change against 81 B when there are 36 has 45 bytes
of imaginary headroom in the region that is hardest to grow.
To re-measure:
Last used address per region, minus the region end, is the tail. Full tables
for both products are now in the cfg headers (PR #188): each cfg carries a
dated, profile-tagged, PRG-hash-stamped
Measured region occupancyblock, andthose blocks are the natural thing for CLAUDE.md to point at.
Suggested fix
Per #161's rule — would this copy change if the fact did? — a byte count in
CLAUDE.md answers no, and there are now two cfg blocks that carry the same
facts next to the
SEGMENTSlines that produce them. So prefer deletingthe three figures over refreshing them:
:427→ sayCRYPTO_HOTis the tightest region under UCI and that themargin is profile-dependent, pointing at the occupancy block in the cfg
the profile actually links. Keep "watch it on every pin bump".
:424and:558→ drop the 223 B;:424's point (a new resident tenantshrinks what the rigs'
MemoryArbitercan hand out, and brokerig_https_wiki.py) survives intact without a number, andtools/uci/_memory_policy.pyalready reads
build/labels.txtrather than any written figure.Notes
Found while measuring for #170 (PR #188) and confirmed independently by
adversarial review. Deliberately not folded into #188 — that PR is
comment-only inside
cfg/, verified PRG-neutral, and other lanes are editingCLAUDE.md concurrently. Filing rather than editing for the same reason.