buffer_close(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

✨ NAME ✨

buffer_close β€” close buffer πŸ’–

okay bestie, so this is a page straight out of the Library Functions Manual, and today's main character is buffer_close. She does exactly one thing and she does it flawlessly. πŸ’…


πŸŽ€ SYNTAX πŸŽ€

#include <libowfat/buffer.h>

void buffer_close(buffer* b);

yes, that's the whole vibe. one include, one function, zero drama. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

buffer_close closes the file that's associated with the buffer, and it frees/unmaps the memory that's associated with the buffer if buffer_init_free or buffer_mmapread were used. 🫢

so like β€” the close-the-file part? always happening. the free/unmap-the-memory part? that's conditional, bestie, it only kicks in when you set things up with buffer_init_free or buffer_mmapread. no cap. 🌸

not me reading "frees/unmaps" twice to make sure I got it right β€” because both of those words are doing work and you need both of them. πŸ’€

🌈 SEE ALSO 🌈

the whole squad, honestly. go say hi. πŸ‘‘


and that's the tea πŸ“ this lil page is buffer_close(3) from the Library Functions Manual, and it's signed off the same way it came in β€” just buffer_close(3), no source, no version, no date, just vibes. periodt. πŸ’œ