blob: f50b51c91db52bb6d9298e1c43d03467c2b29cf0 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_MMAN_H
8#define _UAPI_LINUX_MMAN_H
9#include <asm/mman.h>
Christopher Ferris1308ad32017-11-14 17:32:13 -080010#include <asm-generic/hugetlb_encode.h>
Christopher Ferris8666d042023-09-06 14:55:31 -070011#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070012#define MREMAP_MAYMOVE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070013#define MREMAP_FIXED 2
Christopher Ferrisaf09c702020-06-01 20:29:29 -070014#define MREMAP_DONTUNMAP 4
Ben Cheng655a7c02013-10-16 16:09:24 -070015#define OVERCOMMIT_GUESS 0
16#define OVERCOMMIT_ALWAYS 1
17#define OVERCOMMIT_NEVER 2
Christopher Ferris24f97eb2019-05-20 12:58:13 -070018#define MAP_SHARED 0x01
19#define MAP_PRIVATE 0x02
20#define MAP_SHARED_VALIDATE 0x03
Christopher Ferris63fcca42024-09-26 01:12:10 +000021#define MAP_DROPPABLE 0x08
Christopher Ferris1308ad32017-11-14 17:32:13 -080022#define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
23#define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK
Christopher Ferris32ff3f82020-12-14 13:10:04 -080024#define MAP_HUGE_16KB HUGETLB_FLAG_ENCODE_16KB
Christopher Ferris1308ad32017-11-14 17:32:13 -080025#define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB
26#define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB
27#define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB
28#define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB
29#define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB
30#define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB
Christopher Ferris9ce28842018-10-25 12:11:39 -070031#define MAP_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB
Christopher Ferris1308ad32017-11-14 17:32:13 -080032#define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
Christopher Ferris9ce28842018-10-25 12:11:39 -070033#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
Christopher Ferris1308ad32017-11-14 17:32:13 -080034#define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB
35#define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB
36#define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB
Christopher Ferris8666d042023-09-06 14:55:31 -070037struct cachestat_range {
38 __u64 off;
39 __u64 len;
40};
41struct cachestat {
42 __u64 nr_cache;
43 __u64 nr_dirty;
44 __u64 nr_writeback;
45 __u64 nr_evicted;
46 __u64 nr_recently_evicted;
47};
Ben Cheng655a7c02013-10-16 16:09:24 -070048#endif