Skip to main content

Module aligned_buf

Module aligned_buf 

Source
Expand description

Page-aligned buffer allocation for efficient I/O.

On modern kernels, page-aligned buffers avoid extra copies in the page cache and can be used with O_DIRECT or similar APIs. This module provides a safe wrapper around platform-specific allocation primitives.

§Safety

This is an isolated unsafe module (like io::uring and io::windows). Every unsafe block carries a // SAFETY: comment.

Structs§

AlignedBuf
A page-aligned buffer that deallocates itself on drop.