memeq(3)

πŸŽ€ memeq β€” like, are these two blobs of memory the same or not bestie πŸ’–

okay so real talk, this is memeq from section 3 of the manual (Library Functions Manual, iykyk), and the whole entire job is "memory equal" ✨. that's it. that's the function. lowkey iconic for how unbothered it is πŸ’…


πŸ’œ LIBRARY πŸ’œ

gnulib β€” The GNU Portability Library 🧚 bestie lives in gnulib, so your code stays slay across every platform no cap


✨ SYNOPSIS ✨

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

bool memeq(const void *m1, const void *m2, size_t n);
🫢 heads up: that comment is literally telling you to go peek at memory.h(3head) if you want the whole lore

🌸 DESCRIPTION 🌸

okay so here's the vibe: memeq() figures out whether the first n bytes of the memory areas pointed to by m1 and m2 are equal. like, byte-for-byte. that's the entire plot πŸ“

no drama, no surprises, just a straight-up comparison. the way that it's just doing its one job? obsessed πŸ’–


πŸ”₯ RETURN VALUE πŸ”₯

memeq() returns true if and only if the first n bytes of the memory areas pointed to by m1 and m2 are equal.

and bestie, notice the "if and only if" β€” that's a two-way street. equal bytes β†’ true. not equal β†’ not true. no in-between, no maybes, no "it depends" πŸ’€ periodt.


πŸ‘‘ ATTRIBUTES πŸ‘‘

if you want the full breakdown of what these words even mean, go read attributes(7) β€” it's the glossary, trust.

  • Interface: memeq()
    • Attribute: Thread safety
    • Value: MT-Safe πŸ”₯

so yeah, she's MT-Safe β€” multiple threads can run her at the same time and she won't start anything. we love a drama-free queen πŸ‘‘


🌈 STANDARDS 🌈

GNU. πŸƒ that's the standard. that's the whole standard.


πŸ¦‹ HISTORY πŸ¦‹

came into this world in gnulib 202601. a whole era ✨


πŸ’« SEE ALSO πŸ’«

  • string(3) β€” go read it, your honor 🫢

and that's the whole page bestie, mwah πŸ’…

this little love letter to memeq(3) came to you from Linux man-pages 6.20, dated 2026-08-10 🌸 stay portable, stay MT-Safe, drink water πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ 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