@gtkx/ffi / alloc
Function: alloc()
alloc(
size,typeName?,library?):NativeHandle
Defined in: packages/ffi/src/native.ts:129
Allocates native memory for a structure or buffer.
Parameters
| Parameter | Type | Description |
|---|---|---|
size | number | Number of bytes to allocate |
typeName? | string | Optional type name for debugging |
library? | string | Optional library name for debugging |
Returns
Handle to the allocated memory
Throws
If runtime not started