pub struct GrowableVmars { /* private fields */ }Expand description
Implements a list of VMARs that grows, but never shrinks, to support additional allocations.
This does not actually track allocations and frees, but rather allows for performing a probe just prior to allocation to find a VMAR that has space. Although probing is less efficient, this is useful if the exact amounts allocated, and when they are freed, cannot be easily tracked.
Implementations§
Source§impl GrowableVmars
impl GrowableVmars
Sourcepub fn probe(&mut self) -> Result<Arc<Vmar>, Errno>
pub fn probe(&mut self) -> Result<Arc<Vmar>, Errno>
Returns a handle to a VMAR that has at least PROBE_SIZE bytes of free space.
The returned handle is suitable for passing to thrd_set_zx_create_handles via the
thrd_zx_create_handles_t structure.
Sourcepub fn new() -> GrowableVmars
pub fn new() -> GrowableVmars
Creates a new empty GrowableVmars.
Trait Implementations§
Source§impl Debug for GrowableVmars
impl Debug for GrowableVmars
Source§impl Default for GrowableVmars
impl Default for GrowableVmars
Source§fn default() -> GrowableVmars
fn default() -> GrowableVmars
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GrowableVmars
impl RefUnwindSafe for GrowableVmars
impl Send for GrowableVmars
impl Sync for GrowableVmars
impl Unpin for GrowableVmars
impl UnsafeUnpin for GrowableVmars
impl UnwindSafe for GrowableVmars
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more