task_nommu.c (5ad4e53bd5406ee214ddc5a41f03f779b8b2d526) | task_nommu.c (33e5d76979cf01e3834814fe0aea569d1d602c1a) |
---|---|
1 2#include <linux/mm.h> 3#include <linux/file.h> 4#include <linux/fdtable.h> | 1 2#include <linux/mm.h> 3#include <linux/file.h> 4#include <linux/fdtable.h> |
5#include <linux/fs_struct.h> | |
6#include <linux/mount.h> 7#include <linux/ptrace.h> 8#include <linux/seq_file.h> 9#include "internal.h" 10 11/* 12 * Logic: we've got two memory sums for each process, "shared", and 13 * "non-shared". Shared memory may get counted more than once, for --- 31 unchanged lines hidden (view full) --- 45 } 46 } 47 48 if (atomic_read(&mm->mm_count) > 1) 49 sbytes += kobjsize(mm); 50 else 51 bytes += kobjsize(mm); 52 | 5#include <linux/mount.h> 6#include <linux/ptrace.h> 7#include <linux/seq_file.h> 8#include "internal.h" 9 10/* 11 * Logic: we've got two memory sums for each process, "shared", and 12 * "non-shared". Shared memory may get counted more than once, for --- 31 unchanged lines hidden (view full) --- 44 } 45 } 46 47 if (atomic_read(&mm->mm_count) > 1) 48 sbytes += kobjsize(mm); 49 else 50 bytes += kobjsize(mm); 51 |
53 if (current->fs && current->fs->users > 1) | 52 if (current->fs && atomic_read(¤t->fs->count) > 1) |
54 sbytes += kobjsize(current->fs); 55 else 56 bytes += kobjsize(current->fs); 57 58 if (current->files && atomic_read(¤t->files->count) > 1) 59 sbytes += kobjsize(current->files); 60 else 61 bytes += kobjsize(current->files); --- 70 unchanged lines hidden (view full) --- 132 133 if (file) { 134 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 135 dev = inode->i_sb->s_dev; 136 ino = inode->i_ino; 137 } 138 139 seq_printf(m, | 53 sbytes += kobjsize(current->fs); 54 else 55 bytes += kobjsize(current->fs); 56 57 if (current->files && atomic_read(¤t->files->count) > 1) 58 sbytes += kobjsize(current->files); 59 else 60 bytes += kobjsize(current->files); --- 70 unchanged lines hidden (view full) --- 131 132 if (file) { 133 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 134 dev = inode->i_sb->s_dev; 135 ino = inode->i_ino; 136 } 137 138 seq_printf(m, |
140 "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n", | 139 "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n", |
141 vma->vm_start, 142 vma->vm_end, 143 flags & VM_READ ? 'r' : '-', 144 flags & VM_WRITE ? 'w' : '-', 145 flags & VM_EXEC ? 'x' : '-', 146 flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p', | 140 vma->vm_start, 141 vma->vm_end, 142 flags & VM_READ ? 'r' : '-', 143 flags & VM_WRITE ? 'w' : '-', 144 flags & VM_EXEC ? 'x' : '-', 145 flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p', |
147 vma->vm_pgoff << PAGE_SHIFT, | 146 (unsigned long long) vma->vm_pgoff << PAGE_SHIFT, |
148 MAJOR(dev), MINOR(dev), ino, &len); 149 150 if (file) { 151 len = 25 + sizeof(void *) * 6 - len; 152 if (len < 1) 153 len = 1; 154 seq_printf(m, "%*c", len, ' '); 155 seq_path(m, &file->f_path, ""); --- 95 unchanged lines hidden --- | 147 MAJOR(dev), MINOR(dev), ino, &len); 148 149 if (file) { 150 len = 25 + sizeof(void *) * 6 - len; 151 if (len < 1) 152 len = 1; 153 seq_printf(m, "%*c", len, ' '); 154 seq_path(m, &file->f_path, ""); --- 95 unchanged lines hidden --- |