memdup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memdup(9) β€” Kernel API Manual, bestie edition πŸŽ€

okay so welcome to the memdup page, part of the Kernel API Manual ✨ this one's short and sweet and honestly? iconic for it. no cap.


🌸 NAME 🌸

memdup β€” duplicate region of memory 🫢

that's it. that's the whole job. it duplicates a region of memory. lowkey the most well-adjusted function on the block.


✨ SYNOPSIS ✨

void * memdup (const void *src , size_t len );

look at her. returns a void *, takes exactly two things, no drama, no surprises. main character energy fr fr πŸ’œ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • src β€” memory region to duplicate. like, the actual memory you want copied. hand it over πŸ’Œ
  • len β€” memory region length. how much of it we're talking about. the size, the length, the whole vibe check of how many bytes we're duplicating πŸ“
ngl both of these are mandatory in spirit β€” src is what, len is how much. don't mix them up bestie 😭

🌈 SEE ALSO 🌈

go touch some adjacent grass, all under the kernel file ./tools/lib/string.c, and also these fine pages:

the whole string-utility friend group πŸ’… iykyk


πŸŽ€ so yeah, that's the whole page. it's giving "small but mighty". go duplicate some memory responsibly, bestie. mwah πŸ’–

✨ that's a wrap ✨ this lil beauty lives in ./tools/lib, dated October 2026, and it's filed under memdup(9) β€” remember the name, she's iconic πŸ‘‘πŸ“

πŸ“¦ where this page comes from