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
/// A hardware and storage abstraction layer for the Buddy Allocator's metadata.
///
/// This trait acts as a bridge between the core allocator logic and the actual physical
/// or virtual storage where the page metadata resides. By implementing this trait,
/// the allocator becomes decoupled from the underlying system architecture, allowing it
/// to run on bare-metal embedded systems, operating system kernels, or standard user-space test environments.
///
/// # Why This Architecture Matters
/// The buddy allocator needs to read and write states (like order, links, and ceilings)
/// for billions of memory blocks very quickly. Instead of hardcoding *how* and *where*
/// this metadata is looked up, the allocator delegates that responsibility to this adapter.
///
use crateIBuddyMetaData;