Struct ObjectAllocator

Source
pub struct ObjectAllocator { /* private fields */ }

Implementations§

Source§

impl ObjectAllocator

Source

pub const fn empty() -> Self

Source

pub fn init(&self, untyped: Untyped)

Source

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

Source

pub fn alloc_untyped(&self, size_bits: usize) -> Cap<Untyped>

Source

pub fn allocate_slot(&self) -> LeafSlot

TODO: 申请多个位置,且判断位置是否超出

Source

pub fn extend_slot(&self, slot: LeafSlot)

Source

pub fn allocate_and_retype(&self, blueprint: ObjectBlueprint) -> Unspecified

Allocate the slot at the new cspace.

Source

pub fn retype_to_first(&self, blueprint: ObjectBlueprint) -> Unspecified

Allocate the slot at the new cspace.

Source

pub fn allocate_and_retyped_fixed_sized<T: CapTypeForObjectOfFixedSize>( &self, ) -> Cap<T>

Allocate and retype the slot at the new cspace

Source

pub fn allocate_and_retyped_variable_sized<T: CapTypeForObjectOfVariableSize>( &self, size_bits: usize, ) -> Cap<T>

ALlocate and retype the slot at the new cspace

Source

pub fn alloc_page(&self) -> Granule

申请一个物理页 Granule

Source

pub fn alloc_endpoint(&self) -> Endpoint

申请一个 Endpoint

Source

pub fn alloc_cnode(&self, size_bits: usize) -> CNode

申请一个 CNode

Source

pub fn alloc_vspace(&self) -> VSpace

申请一个 VSpace

Source

pub fn alloc_pt(&self) -> PT

申请一个页表 PT

Source

pub fn alloc_tcb(&self) -> Tcb

申请一个进程控制块 Tcb

Source

pub fn alloc_notification(&self) -> Notification

申请一个 Notification Notification

Source

pub fn alloc_pages(&self, pages: usize) -> Vec<Granule>

申请多个页

Auto Trait Implementations§

§

impl !Freeze for ObjectAllocator

§

impl !RefUnwindSafe for ObjectAllocator

§

impl Send for ObjectAllocator

§

impl Sync for ObjectAllocator

§

impl Unpin for ObjectAllocator

§

impl UnwindSafe for ObjectAllocator

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.