Title memory by address: packed structures go up whole when the builder unpacks them; small buffers' pages stay title memory

The arenas of run light-3, read offline: 2,833 instances, valid top levels and dynamic structures, three quarters of the streamed ones unpacked right. The rest were unpacked a second time (the same bytes streamed in again do not differ from those last taken), into garbage over their neighbours. And the sizes the title reads of a structure (compaction) never came back where their small buffer lay in an arena's page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 04:15:29 -06:00
1 parent bde604e725
commit 773b403171
2 files changed
+131 -40

No files matched your search

+8
View File
@@ -4571,6 +4571,14 @@ pub(crate) fn in_buffer(address: u64, len: u64) -> Option<(u64, u64)> {
found.map(|(k, e)| (k.0, e.end - k.0))
}
/// Whether a title buffer of at most `most` bytes lies in `[address, address
/// + len)`, all of it or in part.
pub(crate) fn small_buffer_in(address: u64, len: u64, most: u64) -> bool {
let map = buffers_read();
map.range((address.saturating_sub(most), 0)..(address + len, 0))
.any(|(key, entry)| entry.end > address && entry.end - key.0 <= most)
}
/// A copy of the memory `[start, start + len)` (an arena of
/// [`crate::memory`]'s, its directory, title memory around a small buffer)
/// for the programs that find memory by address, on the card: the structures