diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index afcaac66cbd5..a9c0b7d26303 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -256,6 +256,16 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
256 | #define dec_mm_counter(mm, member) (mm)->_##member-- | 256 | #define dec_mm_counter(mm, member) (mm)->_##member-- |
257 | #define get_mm_rss(mm) ((mm)->_file_rss + (mm)->_anon_rss) | 257 | #define get_mm_rss(mm) ((mm)->_file_rss + (mm)->_anon_rss) |
258 | 258 | ||
259 | #define update_hiwater_rss(mm) do { \ | ||
260 | unsigned long _rss = get_mm_rss(mm); \ | ||
261 | if ((mm)->hiwater_rss < _rss) \ | ||
262 | (mm)->hiwater_rss = _rss; \ | ||
263 | } while (0) | ||
264 | #define update_hiwater_vm(mm) do { \ | ||
265 | if ((mm)->hiwater_vm < (mm)->total_vm) \ | ||
266 | (mm)->hiwater_vm = (mm)->total_vm; \ | ||
267 | } while (0) | ||
268 | |||
259 | typedef unsigned long mm_counter_t; | 269 | typedef unsigned long mm_counter_t; |
260 | 270 | ||
261 | struct mm_struct { | 271 | struct mm_struct { |