Title memory by address: pages in arenas, structures' pages made ready ahead
Windows of title memory around every page took 8 GB (run light-2, 0.5-1 s a frame): structures are streamed in anywhere between other data. A 64 KiB page outside title buffers now has a page of its own in an arena on the card; only the title's GPU memory is taken; what instances in a list's upload memory name is there before the top level is built, 1 MiB from each root view before the rehydration stages unpack it in place. VICTORY_MEMORY_DUMP=<folder> writes the arenas out (diagnostics). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b558934d7b
commit
bde604e725
4 files changed
+516
-228
No files matched your search
@@ -133,6 +133,16 @@ impl Drop for Upload {
|
||||
}
|
||||
}
|
||||
|
||||
/// The block handed out that holds `address`: its start and bytes (whole
|
||||
/// [`BLOCK`]s).
|
||||
pub(crate) fn block(address: usize) -> Option<(usize, usize)> {
|
||||
let arenas = ARENAS.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let arena = arenas.iter().find(|a| (a.at..a.at + a.taken.len() * BLOCK).contains(&address))?;
|
||||
let first = (address - arena.at) / BLOCK;
|
||||
let n = arena.taken[first..].iter().take_while(|t| **t).count();
|
||||
(n > 0).then_some((arena.at + first * BLOCK, n * BLOCK))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in new issue
Block a user