Module mmtk::util::rust_util

source ·
Expand description

Utilities funcitons for Rust This module works around limitations of the Rust programming language, and provides missing functionalities that we may expect the Rust programming language and its standard libraries to provide.

Modules§

  • This module provides an iterator that groups adjacent items with the same key.
  • This module is for allocating large arrays or vectors with initial zero values.

Structs§

  • InitializeOnce creates an uninitialized value that needs to be manually initialized later. InitializeOnce guarantees the value is only initialized once. This type is used to allow more efficient reads. Unlike the lazy_static! which checks whether the static is initialized in every read, InitializeOnce has no extra check for reads.

Functions§

  • This implements std::array::from_fn introduced in Rust 1.63. We should replace this with the standard counterpart after bumping MSRV, but we also need to evaluate whether it would use too much stack space (see code comments).
  • cold 🔒
  • Create a formatted string that makes the best effort idenfying the current process and thread.
  • Const function for min value of two usize numbers.