Module mmtk::util

source ·
Expand description

Utilities used by other modules, including allocators, heap implementation, etc.

Re-exports§

Modules§

  • An abstract of memory address and object reference.
  • Allocators Various allocators implementation.
  • analysis 🔒
    An analysis framework for collecting data and profiling in GC.
  • Helpers for making native APIs. This module contain helpers for the convenience of exposing the MMTk API to native (usually C/C++) programs.
  • Constants used in MMTk
  • Calculation, conversion and rounding for memory related numbers.
  • The copy allocators for a GC worker.
  • Logging edges to check duplicated edges in GC. This is a simple module to log edges and check for duplicate edges.
  • erase_vm 🔒
    Non-generic refs to generic types of <VM>. MMTk uses crate::vm::VMBinding, which allows us to call into bindings with little overhead. As a result, some types in MMTk are generic types with a type parameter <VM>. However, in some cases, using generic types is not allowed. For example, in an object-safe trait, the methods cannot be generic, thus the method’s parameters cannot be generic types.
  • Finalization implementation.
  • freelist 🔒
    A very simple, generic malloc-free allocator
  • Heap implementation, including page resource, mmapper, etc.
  • Implementation of GenericFreeList by an int vector.
  • Checking if an address is an valid MMTk object.
  • Linear scan through a heap range
  • logger 🔒
    Logger initialization
  • Various malloc implementations (conditionally compiled by features) This module exposes a set of malloc API. They are currently implemented with the library malloc. This may change in the future, and will be replaced with a native MMTk implementation. We have two versions for each function:
  • Wrapper functions for memory syscalls such as mmap, mprotect, etc.
  • Metadata (OnSide or InHeader) implementation. This is a generic module to work with metadata including side metadata and in-object metadata.
  • Forwarding word in object copying.
  • Opaque pointers used in MMTk, e.g. VMThread.
  • MMTk command line options.
  • Implementation of GenericFreeList backed by raw memory, allocated on demand direct from the OS (via mmap).
  • Reference processing implementation.
  • rust_util 🔒
    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.
  • sanity 🔒
    Sanity checker for GC.
  • statistics 🔒
    Utils for collecting statistics.
  • treadmill 🔒
    A treadmill implementation.