MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / prefetch_batch

Function prefetch_batch

nodedb/src/data/io/prefetch.rs:54–58  ·  view source on GitHub ↗

Pre-fetch a batch of disjoint memory ranges. Used during BFS planning: prefetch adjacency data for all nodes in the next frontier before the traversal loop touches them.

(ranges: &[(*const u8, usize)])

Source from the content-addressed store, hash-verified

52/// Used during BFS planning: prefetch adjacency data for all nodes
53/// in the next frontier before the traversal loop touches them.
54pub fn prefetch_batch(ranges: &[(*const u8, usize)]) {
55 for &(ptr, len) in ranges {
56 prefetch_pages(ptr, len);
57 }
58}
59
60/// Hint the kernel that pages won't be needed soon (reverse of prefetch).
61///

Callers

nothing calls this directly

Calls 1

prefetch_pagesFunction · 0.85

Tested by

no test coverage detected