mmap_unmap(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mmap_unmap ✨

okay so this is the manual page for mmap_unmap, from the Library Functions Manual bestie πŸ’– like it lives in section 3 of the man pages, the library functions girlies πŸŽ€


πŸ’… NAME πŸ’…

mmap_unmap β€” unmap an existing memory mapping

yep that's the whole job. it unmaps. it's giving cleanup era 🧹✨


πŸ¦‹ SYNTAX πŸ¦‹

ok so first you gotta pull in the header, like:

#include <libowfat/mmap.h>

and then the actual function, she's short and sweet:

int mmap_unmap(char* mapped,size_t maplen);

no cap, that's it. mapped is your pointer, maplen is your size, and she returns an int πŸ’œ


🌸 DESCRIPTION 🌸

okay so listen 🫢 mmap_unmap removes a memory mapping. like, it takes that mapping you made and it's like "ok bye bestie" πŸ‘‹

but here's the tea β€” it only handles mappings that were established by one of these three:

  • mmap_read
  • mmap_private
  • mmap_shared

so if you made your mapping with one of those, mmap_unmap is your girl πŸ’– if you didn't... that's a different conversation, and this page is not having it πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're iconic fr fr:


lowkey important: this page comes straight out of the Library Functions Manual, and it's filed under mmap_unmap(3) β€” that's the section 3 girlies, library functions only πŸ’…

and that's the whole page bestie, thanks for coming to my ted talk, go free your memory πŸŒˆπŸ’–βœ¨ slay, periodt πŸŽ€