memory.h(3head)
π memory.h β NAME π
okay bestie so like, memory.h is literally the memory operations header π
that's it that's the vibe, no cap
π LIBRARY
Standard C library (libc, -lc) π«Ά
β¨ SYNOPSIS β¨
#include <memory.h>
πΈ DESCRIPTION πΈ
this header is giving "one stop shop for poking at memory" and honestly? iconic π
ποΈ Write
π Copy
π§΅ Catenate
π― Duplicate
βοΈ Compare
π Search
π¦ VERSIONS
so on some systems (looking at you, Illumos π) <memory.h> only has a couple of these functions in it, which means you also need <string.h> to get the rest. annoying? yes. slay? no. π
π STANDARDS
BSD.
these functions also live in <string.h>, as specified by ISO C. and bestie let me tell you why β it's a historic mistake that everyone just kept around for compatibility reasons π« these are not string APIs, fr fr, they never were.
the way the standard just leaked mem* stuff into a string header and now we all live like this π
π HISTORY π
SVr1, 4.3BSD.
okay so storytime π:
- System V (1983) introduced the initial set of
mem*functions in a<memory.h>header file. so that's where it all started β¨ - 4.3BSD (1986) adopted them. slay, we stan adoption π«Ά
- SVID Issue 1 (1985) standardized this header file, BUT said the functions were gonna get moved to
<string.h>. foreshadowing much? π - XPG Issue 3 (1989) listed
<memory.h>as WITHDRAWN, and said the functions had been moved to<string.h>. periodt π - C89 didn't standardize this header file at all, and instead specified all these functions in
<string.h>.
this whole merge of header files has historically confused programmers about the real purpose of these functions. like genuinely, that's the legacy π
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>. not gnulib doing its own thing π
π SEE ALSO
and that's the whole page, bestie! this little love letter to memory.h(3head) was brought to you by Linux man-pages 6.20, dated 2026-08-10 β go forth and memset responsibly πβ¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 1993, David Metcalfe <david@prism.demon.co.uk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms