Atom

ffi.address()

Gets a pointer into packed storage.

Signature

ffi.address(value)

Parameters

Valid packed value.

Returns

Pinned pointer, or null if its storage has no address.

Behavior

Keeps storage alive and guards against growth requiring relocation or removal until released.

Errors

Invalid packed view or wrong type.

Example

Atom
use ffi
buffer = create(u8, 8)
p = ffi.address(buffer)
assert(type(p) == ptr)
ffi.free(p)