memory.h(3head)

πŸ“¦
version 6.20 Β· 2 versions
, in arch rolling, nixpkgs unstable

πŸ’– 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


πŸ¦‹ 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms