pub struct CategoryConfig {
pub pool: u8,
pub max_pages: u32,
pub max_entries: u16,
pub movable: bool,
pub installs: bool,
pub keep_radius: u32,
}Expand description
Budget and behaviour of one category.
Fields§
§pool: u8The pool (see Config::pools) this category allocates from. Several
categories may share one.
max_pages: u32Most pages this category may hold, across all its entries.
max_entries: u16Most entries (resident or in flight) this category may hold. 0 disables the category.
movable: boolWhether compaction may move this category’s unpinned entries. A category whose bytes are addressed by hardware or by long-lived raw pointers (VRAM, SPU RAM, archetype packs) is not movable.
installs: boolWhether a landed payload needs an install step (verify, relocate, upload) before it is resident. When false a finished read is resident.
keep_radius: u32Unwanted entries farther than this are free victims; nearer ones are
in the hysteresis band and go last. Set it to the lead radius plus the
hysteresis, see CategoryConfig::keep_radius_for.
Implementations§
Source§impl CategoryConfig
impl CategoryConfig
Sourcepub const UNUSED: CategoryConfig
pub const UNUSED: CategoryConfig
A disabled category.
Sourcepub const fn keep_radius_for(lead_radius: u32, region_width: u32) -> u32
pub const fn keep_radius_for(lead_radius: u32, region_width: u32) -> u32
The eviction keep radius the design prescribes: the lead radius plus
a hysteresis of max(region_width, lead_radius / 4), so a player
standing in a doorway cannot make two regions thrash.
Trait Implementations§
Source§impl Clone for CategoryConfig
impl Clone for CategoryConfig
Source§fn clone(&self) -> CategoryConfig
fn clone(&self) -> CategoryConfig
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CategoryConfig
impl Debug for CategoryConfig
Source§impl PartialEq for CategoryConfig
impl PartialEq for CategoryConfig
impl Copy for CategoryConfig
impl Eq for CategoryConfig
impl StructuralPartialEq for CategoryConfig
Auto Trait Implementations§
impl Freeze for CategoryConfig
impl RefUnwindSafe for CategoryConfig
impl Send for CategoryConfig
impl Sync for CategoryConfig
impl Unpin for CategoryConfig
impl UnsafeUnpin for CategoryConfig
impl UnwindSafe for CategoryConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)