memcpy ( dst src size -- ) (original) (raw)

memcpy ( dst src size -- )
Factor handbook » C library interface » Passing data between Factor and C » Manual memory management

Prev: |free ( alien -- alien )
Next: memory>byte-array ( alien len -- byte-array )

Vocabulary
libc

Inputs

dst a c-ptr
src a c-ptr
size a non-negative integer

Outputs
None

Word description
Copies size bytes from src to dst.

Warning
According to the BSD C library documentation, the behavior is undefined if the source and destination overlap.

Definition

USING: alien.c-types alien.syntax ;

IN: libc

LIBRARY: libc FUNCTION: void memcpy
( void* dst, void* src, ulong size )