ffi.alloc()
Allocates C-compatible native storage.
Signature
ffi.alloc(count)
Parameters
Positive signed byte count fitting size_t.
Returns
Owned pointer.
Behavior
Zero-fills bytes. Uses the host native allocator pair when configured.
Errors
Invalid count or allocation failure.
Example
use ffi
p = ffi.alloc(32)
assert(type(p) == ptr)
ffi.free(p)