memmove(3)

๐Ÿ’– memmove(3) โ€” memory move ๐Ÿ’–

okay bestie, we're doing a libc classic today. this is memmove, from the Library Functions Manual (that's the man page section, she's a 3 ๐Ÿซถ), and yes she's that girl.


โœจ NAME โœจ

memmove โ€” memory move

lowkey the most self-explanatory name in the whole libc and honestly? iconic for that.


๐Ÿ“š LIBRARY ๐Ÿ“š

Standard C library (libc, -lc)


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

#include <string.h>  // see memory.h(3head)

void *memmove(size_t n;
              void dest[n], const void src[n], size_t n);

so you're gonna need #include <string.h> (and psst, check memory.h(3head) too, she's mentioned there as well). then you call her with n, dest[n], src[n] and n โ€” yes the n shows up twice in that signature, that's not a typo, that's just how the page says it. ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

This function is similar to memcpy(3), but the memory areas may overlap.

that's the whole tea. that's the entire description. memcpy(3) is the sister but she CANNOT handle overlapping regions โ€” if your dest and src are vibing in the same neighbourhood, memcpy(3) fumbles it. memmove says "not on my watch" and handles the overlap just fine. no cap. ๐Ÿ’–


๐Ÿฆ‹ RETURN VALUE ๐Ÿฆ‹

See memcpy(3).

(translation for the girlies who don't wanna tab-flip: the return value deets live over on that page, this one is just pointing. go check her ๐Ÿซถ)


๐Ÿ‘‘ ATTRIBUTES ๐Ÿ‘‘

For an explanation of the terms used in this section, see attributes(7).

  • Interface: memmove()
    • Attribute: Thread safety
    • Value: MT-Safe ๐Ÿ’…

MT-Safe means she's safe to call from multiple threads at once, go off queen.


โญ STANDARDS โญ

C11, POSIX.1-2008.

certified, standardised, validated. periodt.


๐ŸŒˆ HISTORY ๐ŸŒˆ

POSIX.1-2001, C89, SVr4, 4.3BSD.

she's been around since forever, a true elder icon, main character energy since C89.


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


and that's the whole page bestie, you ate that ๐Ÿ“โœจ

source: Linux man-pages 6.20, dated 2026-08-10 โ€” mwah, thanks for coming to my ted talk ๐ŸŽ€๐Ÿ’–

๐Ÿ“ฆ 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