#ifndef _LINUX_MMAN_H
#define _LINUX_MMAN_H
#include <linux/mm.h>
#include <linux/percpu_counter.h>
#include <linux/atomic.h>
#include <uapi/linux/mman.h>
#ifndef MAP_32BIT
#define MAP_32BIT …
#endif
#ifndef MAP_ABOVE4G
#define MAP_ABOVE4G …
#endif
#ifndef MAP_HUGE_2MB
#define MAP_HUGE_2MB …
#endif
#ifndef MAP_HUGE_1GB
#define MAP_HUGE_1GB …
#endif
#ifndef MAP_UNINITIALIZED
#define MAP_UNINITIALIZED …
#endif
#ifndef MAP_SYNC
#define MAP_SYNC …
#endif
#define LEGACY_MAP_MASK …
extern int sysctl_overcommit_memory;
extern int sysctl_overcommit_ratio;
extern unsigned long sysctl_overcommit_kbytes;
extern struct percpu_counter vm_committed_as;
#ifdef CONFIG_SMP
extern s32 vm_committed_as_batch;
extern void mm_compute_batch(int overcommit_policy);
#else
#define vm_committed_as_batch …
static inline void mm_compute_batch(int overcommit_policy)
{
}
#endif
unsigned long vm_memory_committed(void);
static inline void vm_acct_memory(long pages)
{ … }
static inline void vm_unacct_memory(long pages)
{ … }
#ifndef arch_calc_vm_prot_bits
#define arch_calc_vm_prot_bits …
#endif
#ifndef arch_calc_vm_flag_bits
#define arch_calc_vm_flag_bits(flags) …
#endif
#ifndef arch_validate_prot
static inline bool arch_validate_prot(unsigned long prot, unsigned long addr)
{ … }
#define arch_validate_prot …
#endif
#ifndef arch_validate_flags
static inline bool arch_validate_flags(unsigned long flags)
{ … }
#define arch_validate_flags …
#endif
#define _calc_vm_trans(x, bit1, bit2) …
static inline unsigned long
calc_vm_prot_bits(unsigned long prot, unsigned long pkey)
{ … }
static inline unsigned long
calc_vm_flag_bits(unsigned long flags)
{ … }
unsigned long vm_commit_limit(void);
#ifndef arch_memory_deny_write_exec_supported
static inline bool arch_memory_deny_write_exec_supported(void)
{ … }
#define arch_memory_deny_write_exec_supported …
#endif
static inline bool map_deny_write_exec(struct vm_area_struct *vma, unsigned long vm_flags)
{ … }
#endif