mempcpy(3)

mempcpy3

Copy bytes in memory

Part of memcpy(3).

Usage

#include <string.h>

void *

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

void *

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

Library

Standard C Library (libc, -lc)

Overview

The memcpy() and mempcpy() functions copy len bytes from object src to object dst. If src and dst overlap, the results are not defined.

Return values

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

The mempcpy() function returns a pointer to the byte after the last written byte.

Releases

14 releases since FreeBSD 13.1-RELEASE; the text changed 5 times.

  1. 13.1–13.2
  2. 13.3–13.5
  3. 14.0
  4. 14.1–14.5
  5. 15.0–15.1
  6. 16.0

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 mempcpy() function first appeared in FreeBSD 13.1.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.