Module plan

Module plan 

Source
Expand description

GC algorithms from the MMTk suite.

This module provides various GC plans, each of which implements a GC algorithm. Generally a plan consists of a few parts:

  • A plan type that implements the Plan trait, which defines spaces used in the plan, and their behaviors in GC and page accounting.
  • A mutator definition, which describes the mapping between allocators and allocation semantics, and the mapping between allocators and spaces. If the plan needs barrier, the barrier definition is also included here.
  • A constant for PlanConstraints, which defines plan-specific constants.
  • Plan-specific GCWork, which is scheduled during GC.

For more about implementing a plan, it is recommended to read the MMTk tutorial.

Modulesยง

barriers ๐Ÿ”’
Read/Write barrier implementations.
compressor ๐Ÿ”’
concurrent ๐Ÿ”’
gc_work ๐Ÿ”’
This module holds work packets for CommonPlan and BasePlan, or other work packets not directly related to scheduling.
generational ๐Ÿ”’
Generational plans (with a copying nursery) Generational plans
global ๐Ÿ”’
The global part of a plan implementation.
immix ๐Ÿ”’
markcompact ๐Ÿ”’
marksweep ๐Ÿ”’
Plan: marksweep
mutator_context ๐Ÿ”’
Mutator context for each application thread.
nogc ๐Ÿ”’
Plan: nogc (allocation-only)
pageprotect ๐Ÿ”’
Plan: pageprotect
plan_constraints ๐Ÿ”’
Plan-specific constraints.
semispace ๐Ÿ”’
Plan: semispace
sticky ๐Ÿ”’
Sticky plans (using sticky marks for generational behaviors without a copying nursery)
tracing ๐Ÿ”’
This module contains code useful for tracing, i.e. visiting the reachable objects by traversing all or part of an object graph.

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.
ObjectsClosure
A transitive closure visitor to collect the slots from objects. It maintains a buffer for the slots, and flushes slots to a new work packet if the buffer is full or if the type gets dropped.
PlanConstraints
This struct defines plan-specific constraints. Most of the constraints are constants. Each plan should declare a constant of this struct, and use the constant wherever possible. However, for plan-neutral implementations, these constraints are not constant.
VectorQueue
An implementation of ObjectQueue using a Vec.

Enumsยง

AllocationSemantics
Allocation semantics that MMTk provides. Each allocation request requires a desired semantic for the object to allocate.
BarrierSelector
BarrierSelector describes which barrier to use.

Constantsยง

GENCOPY_CONSTRAINTS
The plan constraints for the generational copying plan.
GENIMMIX_CONSTRAINTS
The plan constraints for the generational immix plan.
IMMIX_CONSTRAINTS
The plan constraints for the immix plan.
MARKCOMPACT_CONSTRAINTS
The plan constraints for the mark compact plan.
MS_CONSTRAINTS
The plan constraints for the mark sweep plan.
NOGC_CONSTRAINTS
The plan constraints for the no gc plan.
PP_CONSTRAINTS
The plan constraints for the page protect plan.
SS_CONSTRAINTS
The plan constraints for the semispace plan.
STICKY_IMMIX_CONSTRAINTS
The plan constraints for the sticky immix plan.

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.
ObjectQueue
This trait represents an object queue to enqueue objects during tracing.
Plan
A plan describes the global core functionality for all memory management schemes. All global MMTk plans should implement this trait.

Type Aliasesยง

VectorObjectQueue
A vector queue for object references.