pub struct Registry<const SLOTS: usize> { /* private fields */ }Expand description
Small persistent allocation/publication registry. Keep it across title, gameplay and title re-admission so old handles cannot become current again.
Implementations§
Source§impl<const SLOTS: usize> Registry<SLOTS>
impl<const SLOTS: usize> Registry<SLOTS>
Sourcepub const fn new(pool: u8, capacity_bytes: u32) -> Self
pub const fn new(pool: u8, capacity_bytes: u32) -> Self
Byte capacity of the existing arena, with at most SLOTS allocations.
Sourcepub fn install(
&mut self,
arena: &mut CallerArena<'_>,
words: &[u32],
descriptor: Descriptor,
) -> Result<Handle, Error>
pub fn install( &mut self, arena: &mut CallerArena<'_>, words: &[u32], descriptor: Descriptor, ) -> Result<Handle, Error>
Install a completed, checked payload. Copy, relocation and I-cache synchronization all finish before the handle becomes admissible.
Sourcepub fn admit<'a, 'buffer>(
&'a mut self,
arena: &'a mut CallerArena<'buffer>,
dependencies: &'a [Handle],
) -> Result<Admission<'a, 'buffer, SLOTS>, Error>
pub fn admit<'a, 'buffer>( &'a mut self, arena: &'a mut CallerArena<'buffer>, dependencies: &'a [Handle], ) -> Result<Admission<'a, 'buffer, SLOTS>, Error>
Borrow the arena and registry until every CPU call/data view completes. All dependencies are checked before any admission is returned.
Sourcepub fn unload(&mut self, handle: Handle) -> bool
pub fn unload(&mut self, handle: Handle) -> bool
Remove an allocation after external DMA/render users have completed. A live admission prevents this mutable registry access in safe Rust.
Sourcepub fn invalidate_all(&mut self)
pub fn invalidate_all(&mut self)
Quiescent phase handoff before gameplay overwrites title code storage. Persistent PagePool generations survive the next title re-admission.