From: William Lee Irwin III Some kind of brainfart happened here, though it's not visible on the default display from top(1) etc. This patch fixes up the gibberish I mistakenly put down for text with the proper text size, and subtracts it from data as per the O(vmas) code beforehand. Signed-off-by: Andrew Morton --- 25-akpm/fs/proc/task_mmu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/proc/task_mmu.c~o1-proc_pid_statm-fix fs/proc/task_mmu.c --- 25/fs/proc/task_mmu.c~o1-proc_pid_statm-fix Tue Aug 24 15:06:32 2004 +++ 25-akpm/fs/proc/task_mmu.c Tue Aug 24 15:06:32 2004 @@ -36,8 +36,8 @@ int task_statm(struct mm_struct *mm, int int *data, int *resident) { *shared = mm->shared_vm; - *text = mm->exec_vm - ((mm->end_code - mm->start_code) >> PAGE_SHIFT); - *data = mm->total_vm - mm->shared_vm; + *text = (mm->end_code - mm->start_code) >> PAGE_SHIFT; + *data = mm->total_vm - mm->shared_vm - *text; *resident = mm->rss; return mm->total_vm; } _