mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add the evicted record and remove a debug line i forgot to trim
This commit is contained in:
parent
e500588360
commit
004599543a
2 changed files with 5 additions and 3 deletions
|
|
@ -555,9 +555,7 @@ impl DictCacheEntry {
|
|||
let pool_index = small_storage_index_from_key(&kcache, self.index).expect("pool should be valid");
|
||||
let ksp = &mut self.small_pool[pool_index];
|
||||
if !ksp.contents.contains(&name.to_string()) {
|
||||
log::warn!("illegal state: key_update fill key pool contents: {:?}", ksp.contents);
|
||||
let tt = ticktimer_server::Ticktimer::new().unwrap();
|
||||
tt.sleep_ms(1000).ok();
|
||||
log::warn!("illegal state: key_update fill key pool contents: {:?}, missing {}", ksp.contents, name);
|
||||
panic!("Entry to fill isn't in the expected pool");
|
||||
}
|
||||
let data_vaddr = small_storage_base_vaddr_from_indices(self.index, pool_index);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,10 @@ pub(crate) struct KeySmallPool {
|
|||
pub(crate) contents: Vec::<String>,
|
||||
/// keeps track of the available space within the pool, avoiding an expensive lookup every time we want to query the available space
|
||||
pub(crate) avail: u16,
|
||||
/// if false, contents are modified and need syncing to disk
|
||||
pub(crate) clean: bool,
|
||||
/// if true, some elements of this pool were evicted to make room in RAM
|
||||
pub(crate) evicted: bool,
|
||||
}
|
||||
impl KeySmallPool {
|
||||
pub(crate) fn new() -> KeySmallPool {
|
||||
|
|
@ -189,6 +192,7 @@ impl KeySmallPool {
|
|||
contents: Vec::<String>::new(),
|
||||
avail: SMALL_CAPACITY as u16,
|
||||
clean: false,
|
||||
evicted: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue