summaryrefslogtreecommitdiff
path: root/include/linux/mman.h
blob: a8956f6588adea55e0373cf59998068851c0e6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef _LINUX_MMAN_H
#define _LINUX_MMAN_H

#include <linux/config.h>

#include <asm/atomic.h>
#include <asm/mman.h>

#define MREMAP_MAYMOVE	1
#define MREMAP_FIXED	2

extern int sysctl_overcommit_memory;
extern int sysctl_overcommit_ratio;
extern atomic_t vm_committed_space;

#ifdef CONFIG_SMP
extern void vm_acct_memory(long pages);
#else
static inline void vm_acct_memory(long pages)
{
	atomic_add(pages, &vm_committed_space);
}
#endif

static inline void vm_unacct_memory(long pages)
{
	vm_acct_memory(-pages);
}

#endif /* _LINUX_MMAN_H */