Module mmtk::plan::mutator_context

source ·
Expand description

Mutator context for each application thread.

Structs§

  • A mutator is a per-thread data structure that manages allocations and barriers. It is usually highly coupled with the language VM. It is recommended for MMTk users 1) to have a mutator struct of the same layout in the thread local storage that can be accessed efficiently, and 2) to implement fastpath allocation and barriers for the mutator in the VM side.
  • This is used for plans to indicate the number of allocators reserved for the plan. This is used as a parameter for creating allocator/space mapping. A plan is required to reserve the first few allocators. For example, if n_bump_pointer is 1, it means the first bump pointer allocator will be reserved for the plan (and the plan should initialize its mapping itself), and the spaces in common/base plan will use the following bump pointer allocators.

Traits§

  • Each GC plan should provide their implementation of a MutatorContext. Note that this trait is no longer needed as we removed per-plan mutator implementation and we will remove this trait as well in the future.

Functions§

  • Create an allocator mapping for spaces in Common/BasePlan for a plan. A plan should reserve its own allocators.
  • Create a space mapping for spaces in Common/BasePlan for a plan. A plan should reserve its own allocators.
  • A place-holder implementation for MutatorConfig::release_func that does nothing.
  • A place-holder implementation for MutatorConfig::prepare_func that should not be called. It is the most often used by plans that sets PlanConstraints::needs_prepare_mutator to false. It is also used by NoGC because it must not trigger GC.
  • A place-holder implementation for MutatorConfig::release_func that should not be called. Currently only used by NoGC.

Type Aliases§