()
| 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 | })?; |
nothing calls this directly
no test coverage detected