$allocate static method

Pointer<wasmtime_linear_memory_t> $allocate(
  1. Allocator $allocator, {
  2. required Pointer<Void> env,
  3. required wasmtime_memory_get_callback_t get_memory,
  4. required wasmtime_memory_grow_callback_t grow_memory,
  5. required Pointer<NativeFunction<Void Function(Pointer<Void>)>> finalizer,
})

Implementation

static ffi.Pointer<wasmtime_linear_memory> $allocate(
  ffi.Allocator $allocator, {
  required ffi.Pointer<ffi.Void> env,
  required wasmtime_memory_get_callback_t get_memory,
  required wasmtime_memory_grow_callback_t grow_memory,
  required ffi.Pointer<
    ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>
  >
  finalizer,
}) => $allocator<wasmtime_linear_memory>()
  ..ref.env = env
  ..ref.get_memory = get_memory
  ..ref.grow_memory = grow_memory
  ..ref.finalizer = finalizer;