mmtk::memory_manager

Function alloc_slow_with_options

source
pub fn alloc_slow_with_options<VM: VMBinding>(
    mutator: &mut Mutator<VM>,
    size: usize,
    align: usize,
    offset: usize,
    semantics: AllocationSemantics,
    options: AllocationOptions,
) -> Address
Expand description

Invoke the allocation slow path of alloc_with_options.

Like alloc_with_options, This allocation function allows alternation to the allocation behaviors, specified by the crate::util::alloc::AllocationOptions. For example, one can allow overcommit the memory to go beyond the heap size without triggering a GC. This function can be used in certain cases where the runtime needs a different allocation behavior other than what the default alloc provides.

Like alloc_slow, this function is also only intended for use when a binding implements the fastpath on the binding side.

Arguments:

  • mutator: The mutator to perform this allocation request.
  • size: The number of bytes required for the object.
  • align: Required alignment for the object.
  • offset: Offset associated with the alignment.
  • semantics: The allocation semantic required for the allocation.