pub fn post_alloc<VM: VMBinding>(
    mutator: &mut Mutator<VM>,
    refer: ObjectReference,
    bytes: usize,
    semantics: AllocationSemantics
Expand description

Perform post-allocation actions, usually initializing object metadata. For many allocators none are required. For performance reasons, a VM should implement the post alloc fast-path on their side rather than just calling this function.


  • mutator: The mutator to perform post-alloc actions.
  • refer: The newly allocated object.
  • bytes: The size of the space allocated for the object (in bytes).
  • semantics: The allocation semantics used for the allocation.