pub struct MemorySegmentManager {
    pub num_segments: usize,
    pub num_temp_segments: usize,
    pub segment_sizes: HashMap<usize, usize>,
    pub segment_used_sizes: Option<Vec<usize>>,
    pub public_memory_offsets: HashMap<usize, Vec<(usize, usize)>>,
}

Fields§

§num_segments: usize§num_temp_segments: usize§segment_sizes: HashMap<usize, usize>§segment_used_sizes: Option<Vec<usize>>§public_memory_offsets: HashMap<usize, Vec<(usize, usize)>>

Implementations§

Adds a new segment and returns its starting location as a RelocatableValue.

Adds a new temporary segment and returns its starting location as a RelocatableValue. Negative segment_index indicates its refer to a temporary segment

Writes data into the memory at address ptr and returns the first address after the data.

Calculates the size (number of non-none elements) of each memory segment.

Returns the number of used segments when they are already computed. Returns None otherwise.

Returns a vector that contains the first relocated address of each memory segment

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.