MCPcopy Create free account
hub / github.com/argumentcomputer/ix / env_root_changes_with_extra_const

Function env_root_changes_with_extra_const

crates/ixon/src/serialize.rs:2510–2520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2508 /// the mapping stays alive as long as any consumer holds the env or
2509 /// any clone of a `LazyConstant` from it.
2510 ///
2511 /// Sections are handled the same way as `get_anon`: §1 blobs are
2512 /// heap-copied and hash-verified (small, eagerly consumed), §3
2513 /// anon_hints is read into `env.anon_hints`, and the reader stops
2514 /// there — the metadata sections (§4-§6) are never touched.
2515 ///
2516 /// On Linux, the kernel's adaptive readahead handles the linear
2517 /// scan during section parsing efficiently; subsequent random
2518 /// access from worker kernel-check threads pages in as needed.
2519 #[cfg(not(target_arch = "riscv64"))]
2520 pub fn get_anon_mmap(path: &std::path::Path) -> Result<Self, String> {
2521 let file = std::fs::File::open(path).map_err(|e| {
2522 format!("Env::get_anon_mmap: open {}: {e}", path.display())
2523 })?;

Callers

nothing calls this directly

Calls 3

store_constMethod · 0.80
defn_constFunction · 0.70
putMethod · 0.45

Tested by

no test coverage detected