MMTk assumes that the VM instantiates instances of MutatorContext
in thread local storage (TLS) for each thread participating in
collection. Accesses to this state are therefore assumed to be
low-cost during mutator time.
This class (and its children) is therefore used for unsynchronized
per-mutator operations such as allocation and write barriers.
The semantics and necessary state for these operations are therefore
specified in the GC-specific subclasses of this class.
MMTk explicitly separates thread-local (this class) and global
operations (@see Plan), so that syncrhonization is localized
and explicit, and thus hopefully minimized (@see Plan). Gloabl (Plan)
and per-thread (this class) state are also explicitly separated.
Operations in this class (and its children) are therefore strictly
local to each mutator thread, and synchronized operations always
happen via access to explicitly global classes such as Plan and its
children. Therefore only "fast path" (unsynchronized)
allocation and barrier semantics are defined in MutatorContext and
its subclasses. These call out to "slow path" (synchronize(d)
methods which have global state and are globally synchronized. For
example, an allocation fast path may bump a pointer without any
syncrhonization (the "fast path") until a limit is reached, at which
point the "slow path" is called, and more memory is aquired from a
As the super-class of all per-mutator contexts, this class implements
basic per-mutator behavior common to all MMTk collectors, including
support for immortal and large object space allocation, as well as
empty stubs for write barriers (to be overridden by sub-classes as