mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
track the current free page in swap ram
This commit is contained in:
parent
884b4d372d
commit
c07f33a169
1 changed files with 6 additions and 0 deletions
|
|
@ -66,6 +66,10 @@ pub struct BootConfig {
|
||||||
/// Kernel does not get swap, so the first entry belongs to PID 2.
|
/// Kernel does not get swap, so the first entry belongs to PID 2.
|
||||||
#[cfg(feature = "swap")]
|
#[cfg(feature = "swap")]
|
||||||
pub swap_page_table: &'static mut [&'static mut PageTable],
|
pub swap_page_table: &'static mut [&'static mut PageTable],
|
||||||
|
|
||||||
|
/// Offset of the current free page in swap
|
||||||
|
#[cfg(feature = "swap")]
|
||||||
|
pub swap_free_page: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for BootConfig {
|
impl Default for BootConfig {
|
||||||
|
|
@ -89,6 +93,8 @@ impl Default for BootConfig {
|
||||||
swap: None,
|
swap: None,
|
||||||
#[cfg(feature = "swap")]
|
#[cfg(feature = "swap")]
|
||||||
swap_page_table: Default::default(),
|
swap_page_table: Default::default(),
|
||||||
|
#[cfg(feature = "swap")]
|
||||||
|
swap_free_page: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue