Module mmtk::policy::copy_context
source · Expand description
Copy context defines the thread local copy allocator for copying policies.
Traits§
- A GC worker’s copy allocator for copying GCs. Each copying policy should provide their implementation of PolicyCopyContext. If we copy objects from one policy to a different policy, the copy context of the destination policy should be used. For example, for generational immix, the nursery is CopySpace, and the mature space is ImmixSpace. When we copy from nursery to mature, ImmixCopyContext should be used. Note that this trait should only be implemented with policy specific behaviors. Please refer to
crate::util::copy::GCWorkerCopyContext
which implements common behaviors for copying.