evictor_bindings/
evictor_bindings.rs1#![expect(non_camel_case_types)]
8#![no_std]
9pub use event_bindings::AutounsignalEvent;
10pub type Thread = core::ffi::c_void;
11
12#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
13#[repr(C, align(8))]
14pub struct __BindgenOpaqueArray8<T>(pub T);
15impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
16 fn default() -> Self {
17 Self([<T as Default>::default(); N])
18 }
19}
20#[repr(C)]
21#[derive(Debug, Copy, Clone)]
22pub struct std_atomic<_Tp> {
23 pub _phantom_0: ::core::marker::PhantomData<::core::cell::UnsafeCell<_Tp>>,
24 pub _address: u8,
25}
26pub type std_atomic___base = u8;
27#[repr(C)]
28#[derive(Debug)]
29pub struct Evictor {
30 pub storage_: __BindgenOpaqueArray8<[u8; 288usize]>,
31}
32#[repr(u8)]
33#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
34pub enum Evictor_EvictionLevel {
35 OnlyOldest = 0,
36 IncludeNewest = 1,
37}
38#[repr(u8)]
39#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
40pub enum Evictor_Output {
41 Print = 1,
42 NoPrint = 0,
43}
44#[repr(u8)]
45#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
46pub enum Evictor_TriggerReason {
47 OOM = 1,
48 Other = 0,
49}
50#[repr(C)]
51#[derive(Debug, Copy, Clone)]
52pub struct Evictor_EvictionTarget {
53 pub pending: bool,
54 pub __bindgen_padding_0: [u8; 7usize],
55 pub free_pages_target: u64,
56 pub min_pages_to_free: u64,
57 pub level: Evictor_EvictionLevel,
58 pub print_counts: bool,
59 pub oom_trigger: bool,
60 pub __bindgen_padding_1: [u8; 5usize],
61}
62#[repr(C)]
63#[derive(Debug, Copy, Clone)]
64pub struct Evictor_EvictedPageCounts {
65 pub pager_backed: u64,
66 pub pager_backed_loaned: u64,
67 pub discardable: u64,
68 pub compressed: u64,
69}
70#[repr(C)]
71#[derive(Debug, Copy, Clone)]
72pub struct Evictor_EvictionResult {
73 pub counts: Evictor_EvictedPageCounts,
74 pub free_target_reached: bool,
75 pub __bindgen_padding_0: [u8; 7usize],
76}
77#[repr(C)]
78#[derive(Debug, Copy, Clone)]
79pub struct Evictor_EvictorStats {
80 pub pager_backed_oom: u64,
81 pub pager_backed_other: u64,
82 pub compression_oom: u64,
83 pub compression_other: u64,
84 pub discarded_oom: u64,
85 pub discarded_other: u64,
86}
87#[repr(C)]
88pub struct Evictor_StateLayout {
89 pub eviction_target: Evictor_EvictionTarget,
90 pub eviction_lock: __BindgenOpaqueArray8<[u8; 24usize]>,
91 pub total_evicted: Evictor_EvictedPageCounts,
92 pub lock: u32,
93 pub __bindgen_padding_0: [u8; 4usize],
94 pub eviction_thread: *mut Thread,
95 pub eviction_thread_exiting: u8,
96 pub __bindgen_padding_1: [u8; 7usize],
97 pub eviction_signal: AutounsignalEvent,
98 pub test_reclaim_function: __BindgenOpaqueArray8<[u8; 48usize]>,
99 pub test_free_pages_function: __BindgenOpaqueArray8<[u8; 48usize]>,
100 pub eviction_enabled: bool,
101 pub use_compression: bool,
102 pub __bindgen_padding_2: [u8; 6usize],
103}