memcpy(3)

memcpy3

Copy memory area

Usage

#include <string.h>

void *

memcpy(void *restrict dst, const void *restrict src, size_t n);

Library

Standard C Library (libc, -lc)

Overview

The memcpy() function copies n bytes from memory area src to memory area dst. If dst and src overlap, behavior is undefined. Applications in which dst and src might overlap should use memmove(3) instead.

Return values

The memcpy() function returns the original value of dst.

Releases

163 releases since Mac OS X 10.0; the text changed 5 times.

  1. 10.0–10.1.5
  2. 10.2–10.2.8
  3. 10.3–10.4.11
  4. 10.5–10.6.8
  5. 10.7–10.8.5
  6. 10.9–26.5

Standards

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

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.