mmtk/policy/marksweepspace/
mod.rs

1//! Mark sweep space.
2//! MMTk provides two implementations of mark sweep:
3//! 1. mark sweep using a native freelist allocator implemented in MMTk. This is the default mark sweep implementation, and
4//!    most people should use this.
5//! 2. mark sweep using malloc as its freelist allocator. Use the feature `malloc_mark_sweep` to enable it. As we do not control
6//!    the allocation of malloc, we have to work around a few issues to make it for mark sweep. Thus it has considerably worse performance.
7//!    This is an experimental feature, and should only be used if you are actually interested in using malloc as the allocator.
8//!    Otherwise this should not be used.
9
10// TODO: we should extract the code about mark sweep, and make both implementation use the same mark sweep code.
11
12// We will only use one of the two mark sweep implementations, depending on the enabled feature.
13#![allow(dead_code)]
14
15/// Malloc mark sweep. This uses `MallocSpace` and `MallocAllocator`.
16pub(crate) mod malloc_ms;
17/// Native mark sweep. This uses `MarkSweepSpace` and `FreeListAllocator`.
18pub(crate) mod native_ms;