alloc property

Pointer<NativeFunction<Pointer<Void> Function(Pointer<Void> ctx, Size len, Uint8 alignment, UintPtr ret_addr)>> alloc
getter/setter pair

Return a pointer to len bytes with specified alignment, or return NULL indicating the allocation failed.

@param ctx The allocator context @param len Number of bytes to allocate @param alignment Required alignment for the allocation. Guaranteed to be a power of two between 1 and 16 inclusive. @param ret_addr First return address of the allocation call stack (0 if not provided) @return Pointer to allocated memory, or NULL if allocation failed

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    ffi.Pointer<ffi.Void> Function(
      ffi.Pointer<ffi.Void> ctx,
      ffi.Size len,
      ffi.Uint8 alignment,
      ffi.UintPtr ret_addr,
    )
  >
>
alloc;