resize property

Pointer<NativeFunction<Bool Function(Pointer<Void> ctx, Pointer<Void> memory, Size memory_len, Uint8 alignment, Size new_len, UintPtr ret_addr)>> resize
getter/setter pair

Attempt to expand or shrink memory in place.

memory_len must equal the length requested from the most recent successful call to alloc, resize, or remap. alignment must equal the same value that was passed as the alignment parameter to the original alloc call.

new_len must be greater than zero.

@param ctx The allocator context @param memory Pointer to the memory block to resize @param memory_len Current size of the memory block @param alignment Alignment (must match original allocation) @param new_len New requested size @param ret_addr First return address of the allocation call stack (0 if not provided) @return true if resize was successful in-place, false if relocation would be required

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    ffi.Bool Function(
      ffi.Pointer<ffi.Void> ctx,
      ffi.Pointer<ffi.Void> memory,
      ffi.Size memory_len,
      ffi.Uint8 alignment,
      ffi.Size new_len,
      ffi.UintPtr ret_addr,
    )
  >
>
resize;