---
name: "bcopy"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/bcopy/9"
---

# bcopy(9)

copy bytes in object

## NAME

**bcopy** – copy bytes in object

## SYNOPSIS

**#include \<sys/systm.h\>**

*void*\

**bcopy**(*const void \*src*, *void \*dst*, *size\_t len*);

## DESCRIPTION

The **bcopy**() function copies *len* bytes from object *src* to object *dst* preserving the provenance of pointers in the copied object (see [memory\_model(7)](/memory_model/7.md) for further information). The two objects may overlap. If *len* is zero, no bytes are copied.

The **bcopy**() function is deprecated and **memcpy**() or **memmove**() should be used as appropriate in new code.

## SEE ALSO

[memcpy(9)](/memcpy/9.md), [memmove(9)](/memmove/9.md)

## HISTORY

A **bcopy**() function appeared in 4.2BSD.

IEEE Std 1003.1-2008 (“POSIX.1”) removes the specification of **bcopy**() and it is marked as LEGACY in IEEE Std 1003.1-2004 (“POSIX.1”). New programs should use [memmove(3)](/memmove/3.md). If the input and output buffer do not overlap, then [memcpy(3)](/memcpy/3.md) is more efficient. Note that **bcopy**() takes *src* and *dst* in the opposite order from **memmove**() and **memcpy**(). In practice, ⟨sys/systm.h⟩ defines **bcopy**() as a macro that calls **memmove**() since FreeBSD 12.0.
