pub struct ObjectAllocator { /* private fields */ }
Implementations§
Source§impl ObjectAllocator
impl ObjectAllocator
pub const fn empty() -> Self
pub fn init(&self, untyped: Untyped)
Sourcepub fn allocate_variable_sized_origin<T: CapTypeForObjectOfVariableSize>(
&self,
size_bits: usize,
) -> Cap<T>
pub fn allocate_variable_sized_origin<T: CapTypeForObjectOfVariableSize>( &self, size_bits: usize, ) -> Cap<T>
Allocate cap with Generic definition and size_bits before rebuilding the cspace
Source§impl ObjectAllocator
impl ObjectAllocator
pub fn alloc_untyped(&self, size_bits: usize) -> Cap<Untyped>
Sourcepub fn allocate_slot(&self) -> LeafSlot
pub fn allocate_slot(&self) -> LeafSlot
TODO: 申请多个位置,且判断位置是否超出
pub fn extend_slot(&self, slot: LeafSlot)
Sourcepub fn allocate_and_retype(&self, blueprint: ObjectBlueprint) -> Unspecified
pub fn allocate_and_retype(&self, blueprint: ObjectBlueprint) -> Unspecified
Allocate the slot at the new cspace.
Sourcepub fn retype_to_first(&self, blueprint: ObjectBlueprint) -> Unspecified
pub fn retype_to_first(&self, blueprint: ObjectBlueprint) -> Unspecified
Allocate the slot at the new cspace.
Sourcepub fn allocate_and_retyped_fixed_sized<T: CapTypeForObjectOfFixedSize>(
&self,
) -> Cap<T>
pub fn allocate_and_retyped_fixed_sized<T: CapTypeForObjectOfFixedSize>( &self, ) -> Cap<T>
Allocate and retype the slot at the new cspace
Sourcepub fn allocate_and_retyped_variable_sized<T: CapTypeForObjectOfVariableSize>(
&self,
size_bits: usize,
) -> Cap<T>
pub fn allocate_and_retyped_variable_sized<T: CapTypeForObjectOfVariableSize>( &self, size_bits: usize, ) -> Cap<T>
ALlocate and retype the slot at the new cspace
Sourcepub fn alloc_page(&self) -> Granule
pub fn alloc_page(&self) -> Granule
申请一个物理页 Granule
Sourcepub fn alloc_endpoint(&self) -> Endpoint
pub fn alloc_endpoint(&self) -> Endpoint
申请一个 Endpoint
Sourcepub fn alloc_cnode(&self, size_bits: usize) -> CNode
pub fn alloc_cnode(&self, size_bits: usize) -> CNode
申请一个 CNode
Sourcepub fn alloc_vspace(&self) -> VSpace
pub fn alloc_vspace(&self) -> VSpace
申请一个 VSpace
Sourcepub fn alloc_notification(&self) -> Notification
pub fn alloc_notification(&self) -> Notification
申请一个 Notification Notification
Sourcepub fn alloc_pages(&self, pages: usize) -> Vec<Granule>
pub fn alloc_pages(&self, pages: usize) -> Vec<Granule>
申请多个页