summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorGuillaumeDIDIER <guillaume.didier95@hotmail.fr>2020-04-12 10:06:29 +0200
committerGuillaume DIDIER <guillaume.didier@polytechnique.edu>2020-04-21 09:25:25 +0200
commitd7a725d88bf3704cd26bc779274265b310ac4b00 (patch)
tree5b258733fdaaea6519581110eec02c6ee5b2b8ab /src/sys
parentb5ee61037886bcbaea6078e2bec9b6709549926a (diff)
downloadnix-d7a725d88bf3704cd26bc779274265b310ac4b00.zip
Add the MAP_HUGE_<SIZE> flags for linux.
Closes #1194 Use git libc for development (Remember to reset this to released version for the next nix release, once libc has released >=0.2.69)
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/mman.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/sys/mman.rs b/src/sys/mman.rs
index 4e250501..dfa46264 100644
--- a/src/sys/mman.rs
+++ b/src/sys/mman.rs
@@ -77,6 +77,43 @@ libc_bitflags!{
/// Allocate the mapping using "huge pages."
#[cfg(any(target_os = "android", target_os = "linux"))]
MAP_HUGETLB;
+ /// Make use of 64KB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_64KB;
+ /// Make use of 512KB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_512KB;
+ /// Make use of 1MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_1MB;
+ /// Make use of 2MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_2MB;
+ /// Make use of 8MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_8MB;
+ /// Make use of 16MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_16MB;
+ /// Make use of 32MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_32MB;
+ /// Make use of 256MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_256MB;
+ /// Make use of 512MB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_512MB;
+ /// Make use of 1GB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_1GB;
+ /// Make use of 2GB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_2GB;
+ /// Make use of 16GB huge page (must be supported by the system)
+ #[cfg(target_os = "linux")]
+ MAP_HUGE_16GB;
+
/// Lock the mapped region into memory as with `mlock(2)`.
#[cfg(target_os = "netbsd")]
MAP_WIRED;