Struct stark::sail::memmgt::RegionTable[][src]

struct RegionTable {
    low_array: *mut usize,
    high_array: *mut usize,
    zone_array: *mut *mut Zone,
    region_array: *mut *mut Region,
    len: usize,
    cap: usize,
    lock: u8,
}
Expand description

Keeps track of memory zones and which regions they belong to using parallel arrays

Fields

low_array: *mut usize

Dynamic array of memory zone low ends

high_array: *mut usize

Dynamic array of memory zone high ends

zone_array: *mut *mut Zone

Dynamic array of memory zones corresponding to above ranges

region_array: *mut *mut Region

Dynamic array of memory regions corresponding to above zones

len: usize

Length of all arrays above

cap: usize

Capacity of all arrays above

lock: u8

Modification lock for region table

Implementations

impl RegionTable[src]

const fn new() -> Self[src]

Create a new region table

TODO: switch to intrinsics::const_alloc

unsafe fn setup(&mut self, cap: usize)[src]

Allocate memory and initialize the table

unsafe fn resize(&mut self, cap: usize)[src]

Resize the table, reallocating as necessary

unsafe fn append(
    &mut self,
    start: usize,
    end: usize,
    zone: *mut Zone,
    region: *mut Region
)
[src]

Add a new entry to the table

unsafe fn index(&mut self, idx: usize) -> (usize, usize, *mut Zone, *mut Region)[src]

Gets a table entry by index

Auto Trait Implementations

impl RefUnwindSafe for RegionTable

impl !Send for RegionTable

impl !Sync for RegionTable

impl Unpin for RegionTable

impl UnwindSafe for RegionTable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.