[][src]Struct gc_arena::ArenaParameters

pub struct ArenaParameters { /* fields omitted */ }

Methods

impl ArenaParameters[src]

pub fn set_pause_factor(self, pause_factor: f64) -> ArenaParameters[src]

The garbage collector will wait until the live size reaches + * pause_multiplier before beginning a new collection. Must be >= 0.0, setting this to 0.0 causes the collector to never sleep longer than min_sleep before beginning a new collection.

pub fn set_timing_factor(self, timing_factor: f64) -> ArenaParameters[src]

The garbage collector will try and finish a collection by the time * timing_factor additional bytes are allocated. For example, if the collection is started when the arena has 100KB live data, and the timing_multiplier is 1.0, the collector should finish its final phase of this collection after another 100KB has been allocated. Must be

= 0.0, setting this to 0.0 causes the collector to behave like a stop-the-world collector.

pub fn set_min_sleep(self, min_sleep: usize) -> ArenaParameters[src]

The minimum allocation amount during sleep before the arena starts collecting again. This is mostly useful when the heap is very small to prevent rapidly restarting collections.

Trait Implementations

impl Default for ArenaParameters[src]

Creates a default ArenaParameters with pause_factor set to 0.5, timing_factor set to 1.5, and min_sleep set to 4096.

impl Clone for ArenaParameters[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ArenaParameters[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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.

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

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

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