---
name: "memory.h"
section: "3head"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/memory.h"
---

# memory.h(3head)

memory operations

## NAME

memory.h - memory operations

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <memory.h>
```

## DESCRIPTION

### Write

- [**bzero**(3)](/bzero/3.md) [**explicit\_bzero**(3)](/explicit_bzero/3.md) [**memset**(3)](/memset/3.md) [**memset\_explicit**(3)](/memset_explicit/3.md)

  ### Copy

- [**memmove**(3)](/memmove/3.md) [**memcpy**(3)](/memcpy/3.md) [**mempcpy**(3)](/mempcpy/3.md) [**memccpy**(3)](/memccpy/3.md) [**strncpy**(3)](/strncpy/3.md) [**stpncpy**(3)](/stpncpy/3.md)

  ### Catenate

- [**strncat**(3)](/strncat/3.md)

  ### Duplicate

- [**strndup**(3)](/strndup/3.md) [**strndupa**(3)](/strndupa/3.md)

  ### Compare

- [**memeq**(3)](/memeq/3.md) [**memcmp**(3)](/memcmp/3.md) [**strncmp**(3)](/strncmp/3.md) [**strncasecmp**(3)](/strncasecmp/3.md)

  ### Search

- [**memchr**(3)](/memchr/3.md) [**memrchr**(3)](/memrchr/3.md) [**memmem**(3)](/memmem/3.md)

  ## VERSIONS

In some systems (Illumos), *\<memory.h\>* contains only a few of these functions, and thus *\<string.h\>* is needed.

## STANDARDS

BSD.

These functions are also provided in *\<string.h\>*, as specified by ISO C. This is a historic mistake maintained for compatibility reasons; these functions aren't string APIs.

## HISTORY

SVr1, 4.3BSD.

System V (1983) introduced an initial set of mem\* functions in a *\<memory.h\>* header file. 4.3BSD (1986) adopted them.

SVID Issue 1 (1985) standardized this header file, but stated that the functions would be moved to *\<string.h\>*.

XPG Issue 3 (1989) listed *\<memory.h\>* as WITHDRAWN, and stated that the functions had been moved to *\<string.h\>*.

C89 didn't standardize this header file and instead specified all these functions in *\<string.h\>*.

This merge of header files has historically confused programmers about the real purpose of these functions.

Most C libraries, including the BSDs, glibc, musl, Bionic, and Illumos continue to provide *\<memory.h\>.*

gnulib doesn't provide it, though, and instead uses *\<string.h\>*.

## SEE ALSO

[**string**(3)](/string/3.md), [**string\_copying**(7)](/string_copying/7.md)
