alien-address ( c-ptr -- addr )
Factor handbook » C library interface » Passing data between Factor and C » Passing pointers to C functions » Alien addresses

Prev:<displaced-alien> ( displacement c-ptr -- alien )
Next:Alien object literal syntax


Vocabulary
alien

Inputs
c-ptra c-ptr


Outputs
addra non-negative integer


Word description
Outputs the address of an alien.

Notes
Taking the address of a byte-array is explicitly prohibited since byte arrays can be moved by the garbage collector between the time the address is taken, and when it is accessed. If you need to pass pointers to C functions which will persist across alien calls, you must allocate unmanaged memory instead. See Manual memory management.

See also
<alien>, <displaced-alien>

Definition