pub fn memory_region_copy_post<VM: VMBinding>(
    mutator: &'static mut Mutator<VM>,
    src: VM::VMMemorySlice,
    dst: VM::VMMemorySlice
)
Expand description

The generic memory region copy post barrier by MMTk, which we expect a binding to call after it performs memory copy. This is called when the VM tries to copy a piece of heap memory to another. The data within the slice does not necessarily to be all valid pointers, but the VM binding will be able to filter out non-reference values on slot iteration.

For VMs that performs a heap memory copy operation, for example OpenJDK’s array copy operation, the binding needs to call memory_region_copy* APIs. Same as object_reference_write*, the binding can choose either the subsuming barrier, or the pre/post barrier.

Arguments:

  • mutator: The mutator for the current thread.
  • src: Source memory slice to copy from.
  • dst: Destination memory slice to copy to.

The size of src and dst shoule be equal