Reference

memcpy_data(9)

copy bytes in memory

Part of memcpy(9).

NAME

memcpy, memcpy_data – copy bytes in memory

SYNOPSIS

#include <sys/systm.h>

void *

memcpy(void *dst, const void *src, size_t len);

void *

memcpy_data(void *dst, const void *src, size_t len);

DESCRIPTION

The memcpy() function copies len bytes from object src to object dst in a manner that preserves the provenance of pointers in the copied object (see memory_model(7) for further information). If src and dst overlap, the results are not defined. The memcpy_data() function does the same except that it does not preserve the provenance of pointers in the copied object. On CHERI targets, the validity tag of any copied capability is explicitly cleared.

RETURN VALUES

The memcpy() and memcpy_data() functions return the original value of dst.

SEE ALSO

bcopy(9), memmove(9), memmove_data(9)

STANDARDS

The memcpy() function conforms to ISO/IEC 9899:1990 (“ISO C90”).

HISTORY

The memcpy() function first appeared in AT&T System V UNIX and was reimplemented for 4.3BSD-Tahoe. The memcpy_data() function first appeared in FreeBSD 16.0.