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
Plantrait, 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
CommonPlanandBasePlan, 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.
- Objects
Closure - 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.
- Plan
Constraints - 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.
- Vector
Queue - An implementation of
ObjectQueueusing aVec.
Enumsยง
- Allocation
Semantics - Allocation semantics that MMTk provides. Each allocation request requires a desired semantic for the object to allocate.
- Barrier
Selector - 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ยง
- Mutator
Context - 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.
- Object
Queue - 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ยง
- Vector
Object Queue - A vector queue for object references.