blob: b40bb4e32c2f790de8b3361408aefa1422ffeb16 [file] [log] [blame]
Alexey Dobriyan8ac773b2006-10-19 23:28:32 -07001#ifndef __INCLUDE_LINUX_OOM_H
2#define __INCLUDE_LINUX_OOM_H
3
David Rientjes5a3135c22007-10-16 23:25:53 -07004#include <linux/sched.h>
5
Alexey Dobriyan8ac773b2006-10-19 23:28:32 -07006/* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
7#define OOM_DISABLE (-17)
8/* inclusive */
9#define OOM_ADJUST_MIN (-16)
10#define OOM_ADJUST_MAX 15
11
David Rientjes5a3135c22007-10-16 23:25:53 -070012#ifdef __KERNEL__
13
14extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
15extern int register_oom_notifier(struct notifier_block *nb);
16extern int unregister_oom_notifier(struct notifier_block *nb);
17
18#endif /* __KERNEL__*/
19#endif /* _INCLUDE_LINUX_OOM_H */