1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Page-fetching abstraction for tiered storage.
//!
//! Provides an indirection layer that lets sections receive paged byte
//! access without knowing whether the bytes come from a memory-mapped
//! file, an explicit buffer pool, or some other source. The mmap-backed
//! implementation lives in `grafeo-storage`; future implementations may
//! include vmcache (TUM, 2024) or an explicit pager with pointer
//! swizzling (LeanStore, VLDB 2024).
//!
//! See `docs/architecture/storage/disk-storage-decisions.md` for the
//! rationale (decision D1).
use io;
/// Hint about the expected access pattern for a range of bytes.
///
/// Best-effort: implementations may ignore hints on platforms that don't
/// support them (for example, Windows lacks a portable `madvise` analogue
/// without unsafe FFI).
/// Fetches byte ranges from a paged storage source.
///
/// Offsets are relative to the start of the fetcher's logical region
/// (i.e., 0 corresponds to the first byte of the section, not the file).