Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPI_LINUX_MMAN_H
0003 #define _UAPI_LINUX_MMAN_H
0004 
0005 #include <asm/mman.h>
0006 #include <asm-generic/hugetlb_encode.h>
0007 
0008 #define MREMAP_MAYMOVE      1
0009 #define MREMAP_FIXED        2
0010 #define MREMAP_DONTUNMAP    4
0011 
0012 #define OVERCOMMIT_GUESS        0
0013 #define OVERCOMMIT_ALWAYS       1
0014 #define OVERCOMMIT_NEVER        2
0015 
0016 #define MAP_SHARED  0x01        /* Share changes */
0017 #define MAP_PRIVATE 0x02        /* Changes are private */
0018 #define MAP_SHARED_VALIDATE 0x03    /* share + validate extension flags */
0019 
0020 /*
0021  * Huge page size encoding when MAP_HUGETLB is specified, and a huge page
0022  * size other than the default is desired.  See hugetlb_encode.h.
0023  * All known huge page size encodings are provided here.  It is the
0024  * responsibility of the application to know which sizes are supported on
0025  * the running system.  See mmap(2) man page for details.
0026  */
0027 #define MAP_HUGE_SHIFT  HUGETLB_FLAG_ENCODE_SHIFT
0028 #define MAP_HUGE_MASK   HUGETLB_FLAG_ENCODE_MASK
0029 
0030 #define MAP_HUGE_16KB   HUGETLB_FLAG_ENCODE_16KB
0031 #define MAP_HUGE_64KB   HUGETLB_FLAG_ENCODE_64KB
0032 #define MAP_HUGE_512KB  HUGETLB_FLAG_ENCODE_512KB
0033 #define MAP_HUGE_1MB    HUGETLB_FLAG_ENCODE_1MB
0034 #define MAP_HUGE_2MB    HUGETLB_FLAG_ENCODE_2MB
0035 #define MAP_HUGE_8MB    HUGETLB_FLAG_ENCODE_8MB
0036 #define MAP_HUGE_16MB   HUGETLB_FLAG_ENCODE_16MB
0037 #define MAP_HUGE_32MB   HUGETLB_FLAG_ENCODE_32MB
0038 #define MAP_HUGE_256MB  HUGETLB_FLAG_ENCODE_256MB
0039 #define MAP_HUGE_512MB  HUGETLB_FLAG_ENCODE_512MB
0040 #define MAP_HUGE_1GB    HUGETLB_FLAG_ENCODE_1GB
0041 #define MAP_HUGE_2GB    HUGETLB_FLAG_ENCODE_2GB
0042 #define MAP_HUGE_16GB   HUGETLB_FLAG_ENCODE_16GB
0043 
0044 #endif /* _UAPI_LINUX_MMAN_H */