#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
#[repr(i32)]
pub enum HugePageSize
{
None = 0,
#[cfg(any(target_os = "android", target_os = "linux"))] Default = MAP_HUGETLB | 0 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _64Kb = MAP_HUGETLB | 16 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _512Kb = MAP_HUGETLB | 19 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _1Mb = MAP_HUGETLB | 20 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _2Mb = MAP_HUGETLB | 21 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _8Mb = MAP_HUGETLB | 23 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _16Mb = MAP_HUGETLB | 24 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _32Mb = MAP_HUGETLB | 25 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _256Mb = MAP_HUGETLB | 28 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _512Mb = MAP_HUGETLB | 29 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _1Gb = MAP_HUGETLB | 30 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _2Gb = MAP_HUGETLB | 31 << Self::MAP_HUGE_SHIFT,
#[cfg(any(target_os = "android", target_os = "linux"))] _16Gb = MAP_HUGETLB | 34 << Self::MAP_HUGE_SHIFT,
}
impl Default for HugePageSize
{
#[inline(always)]
fn default() -> Self
{
HugePageSize::None
}
}
impl HugePageSize
{
#[cfg(any(target_os = "android", target_os = "linux"))] const MAP_HUGE_SHIFT: i32 = 26;
}