Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1127
b: refs/heads/master
c: 64d13c0
h: refs/heads/master
i:
  1125: baa4653
  1123: 7f0eb4b
  1119: 480561a
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed May 17, 2005
1 parent 7dac709 commit 31245b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: baae956100334ffbd101eea5eeea9a5ac9cf3abd
refs/heads/master: 64d13c00cf1f7c3d2c1ff449e2a0500ab568d319
14 changes: 12 additions & 2 deletions trunk/fs/proc/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,23 @@ void get_vmalloc_info(struct vmalloc_info *vmi)
read_lock(&vmlist_lock);

for (vma = vmlist; vma; vma = vma->next) {
unsigned long addr = (unsigned long) vma->addr;

/*
* Some archs keep another range for modules in vmlist
*/
if (addr < VMALLOC_START)
continue;
if (addr >= VMALLOC_END)
break;

vmi->used += vma->size;

free_area_size = (unsigned long) vma->addr - prev_end;
free_area_size = addr - prev_end;
if (vmi->largest_chunk < free_area_size)
vmi->largest_chunk = free_area_size;

prev_end = vma->size + (unsigned long) vma->addr;
prev_end = vma->size + addr;
}

if (VMALLOC_END - prev_end > vmi->largest_chunk)
Expand Down

0 comments on commit 31245b5

Please sign in to comment.