Module mutator_context

Module mutator_context 

Source
Expand description

Mutator context for each application thread.

Structsยง

Mutator
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.
MutatorBuilder
Used to build a mutator struct
MutatorConfig
ReservedAllocators ๐Ÿ”’
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ยง

MutatorContext
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ยง

common_prepare_func ๐Ÿ”’
An mutator prepare implementation for plans that use crate::plan::global::CommonPlan.
common_release_func ๐Ÿ”’
An mutator release implementation for plans that use crate::plan::global::CommonPlan.
create_allocator_mapping ๐Ÿ”’
Create an allocator mapping for spaces in Common/BasePlan for a plan. A plan should reserve its own allocators.
create_space_mapping ๐Ÿ”’
Create a space mapping for spaces in Common/BasePlan for a plan. A plan should reserve its own allocators.
no_op_release_func ๐Ÿ”’
A place-holder implementation for MutatorConfig::release_func that does nothing.
unreachable_prepare_func ๐Ÿ”’
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.
unreachable_release_func ๐Ÿ”’
A place-holder implementation for MutatorConfig::release_func that should not be called. Currently only used by NoGC.

Type Aliasesยง

SpaceMapping ๐Ÿ”’