summaryrefslogtreecommitdiffstats
path: root/third_party/rust/nix/src/sys/memfd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/nix/src/sys/memfd.rs')
-rw-r--r--third_party/rust/nix/src/sys/memfd.rs43
1 files changed, 43 insertions, 0 deletions
diff --git a/third_party/rust/nix/src/sys/memfd.rs b/third_party/rust/nix/src/sys/memfd.rs
index 516ffd3262..22ee5fc5b7 100644
--- a/third_party/rust/nix/src/sys/memfd.rs
+++ b/third_party/rust/nix/src/sys/memfd.rs
@@ -29,6 +29,49 @@ libc_bitflags!(
///
/// [`memfd_create(2)`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
MFD_ALLOW_SEALING;
+ /// Anonymous file will be created using huge pages. It should be safe now to
+ /// combine with [`MFD_ALLOW_SEALING`] too.
+ /// However, despite its presence, on FreeBSD it is unimplemented for now (ENOSYS).
+ ///
+ /// See also the hugetlb filesystem in [`memfd_create(2)`].
+ ///
+ /// [`memfd_create(2)`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
+ #[cfg(linux_android)]
+ MFD_HUGETLB;
+ /// Following are to be used with [`MFD_HUGETLB`], indicating the desired hugetlb size.
+ ///
+ /// See also the hugetlb filesystem in [`memfd_create(2)`].
+ ///
+ /// [`memfd_create(2)`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
+ #[cfg(linux_android)]
+ MFD_HUGE_1MB;
+ /// hugetlb size of 2MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_2MB;
+ /// hugetlb size of 8MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_8MB;
+ /// hugetlb size of 16MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_16MB;
+ /// hugetlb size of 32MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_32MB;
+ /// hugetlb size of 256MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_256MB;
+ /// hugetlb size of 512MB.
+ #[cfg(linux_android)]
+ MFD_HUGE_512MB;
+ /// hugetlb size of 1GB.
+ #[cfg(linux_android)]
+ MFD_HUGE_1GB;
+ /// hugetlb size of 2GB.
+ #[cfg(linux_android)]
+ MFD_HUGE_2GB;
+ /// hugetlb size of 16GB.
+ #[cfg(linux_android)]
+ MFD_HUGE_16GB;
}
);