@@ -399,6 +399,47 @@ cfg_if! {
399
399
}
400
400
}
401
401
402
+ // include/uapi/asm-generic/hugetlb_encode.h
403
+ pub const HUGETLB_FLAG_ENCODE_SHIFT : :: c_int = 26 ;
404
+ pub const HUGETLB_FLAG_ENCODE_MASK : :: c_int = 0x3f ;
405
+
406
+ pub const HUGETLB_FLAG_ENCODE_64KB : :: c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT ;
407
+ pub const HUGETLB_FLAG_ENCODE_512KB : :: c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT ;
408
+ pub const HUGETLB_FLAG_ENCODE_1MB : :: c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT ;
409
+ pub const HUGETLB_FLAG_ENCODE_2MB : :: c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT ;
410
+ pub const HUGETLB_FLAG_ENCODE_8MB : :: c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT ;
411
+ pub const HUGETLB_FLAG_ENCODE_16MB : :: c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT ;
412
+ pub const HUGETLB_FLAG_ENCODE_32MB : :: c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT ;
413
+ pub const HUGETLB_FLAG_ENCODE_256MB : :: c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT ;
414
+ pub const HUGETLB_FLAG_ENCODE_512MB : :: c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT ;
415
+ pub const HUGETLB_FLAG_ENCODE_1GB : :: c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT ;
416
+ pub const HUGETLB_FLAG_ENCODE_2GB : :: c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT ;
417
+ pub const HUGETLB_FLAG_ENCODE_16GB : :: c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT ;
418
+
419
+ // include/uapi/linux/mman.h
420
+ /*
421
+ * Huge page size encoding when MAP_HUGETLB is specified, and a huge page
422
+ * size other than the default is desired. See hugetlb_encode.h.
423
+ * All known huge page size encodings are provided here. It is the
424
+ * responsibility of the application to know which sizes are supported on
425
+ * the running system. See mmap(2) man page for details.
426
+ */
427
+ pub const MAP_HUGE_SHIFT : :: c_int = HUGETLB_FLAG_ENCODE_SHIFT ;
428
+ pub const MAP_HUGE_MASK : :: c_int = HUGETLB_FLAG_ENCODE_MASK ;
429
+
430
+ pub const MAP_HUGE_64KB : :: c_int = HUGETLB_FLAG_ENCODE_64KB ;
431
+ pub const MAP_HUGE_512KB : :: c_int = HUGETLB_FLAG_ENCODE_512KB ;
432
+ pub const MAP_HUGE_1MB : :: c_int = HUGETLB_FLAG_ENCODE_1MB ;
433
+ pub const MAP_HUGE_2MB : :: c_int = HUGETLB_FLAG_ENCODE_2MB ;
434
+ pub const MAP_HUGE_8MB : :: c_int = HUGETLB_FLAG_ENCODE_8MB ;
435
+ pub const MAP_HUGE_16MB : :: c_int = HUGETLB_FLAG_ENCODE_16MB ;
436
+ pub const MAP_HUGE_32MB : :: c_int = HUGETLB_FLAG_ENCODE_32MB ;
437
+ pub const MAP_HUGE_256MB : :: c_int = HUGETLB_FLAG_ENCODE_256MB ;
438
+ pub const MAP_HUGE_512MB : :: c_int = HUGETLB_FLAG_ENCODE_512MB ;
439
+ pub const MAP_HUGE_1GB : :: c_int = HUGETLB_FLAG_ENCODE_1GB ;
440
+ pub const MAP_HUGE_2GB : :: c_int = HUGETLB_FLAG_ENCODE_2GB ;
441
+ pub const MAP_HUGE_16GB : :: c_int = HUGETLB_FLAG_ENCODE_16GB ;
442
+
402
443
pub const RLIMIT_CPU : :: __rlimit_resource_t = 0 ;
403
444
pub const RLIMIT_FSIZE : :: __rlimit_resource_t = 1 ;
404
445
pub const RLIMIT_DATA : :: __rlimit_resource_t = 2 ;
0 commit comments