Skip to content

Commit

Permalink
Improve documentation for huge pages
Browse files Browse the repository at this point in the history
Reading the documentation the magic number 21 caught my eye so I added an explanation.
  • Loading branch information
betelgeuse committed Apr 28, 2024
1 parent cc74502 commit 9403f3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ impl MmapOptions {
/// # Ok(())
/// # }
/// ```
///
/// The number 21 corresponds to `MAP_HUGE_2MB`. See mmap(2) for more details.
pub fn huge(&mut self, page_bits: Option<u8>) -> &mut Self {
self.huge = Some(page_bits.unwrap_or(0));
self
Expand Down

0 comments on commit 9403f3a

Please sign in to comment.