patch-2.2.12 linux/include/linux/mm.h
Next file: linux/include/linux/netdevice.h
Previous file: linux/include/linux/major.h
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Wed Aug 25 17:29:52 1999
- Orig file:
v2.2.11/linux/include/linux/mm.h
- Orig date:
Tue May 11 10:35:45 1999
diff -u --recursive --new-file v2.2.11/linux/include/linux/mm.h linux/include/linux/mm.h
@@ -355,10 +355,11 @@
address &= PAGE_MASK;
grow = vma->vm_start - address;
- if (vma->vm_end - address
- > (unsigned long) current->rlim[RLIMIT_STACK].rlim_cur ||
- (vma->vm_mm->total_vm << PAGE_SHIFT) + grow
- > (unsigned long) current->rlim[RLIMIT_AS].rlim_cur)
+ if ((vma->vm_end - address
+ > current->rlim[RLIMIT_STACK].rlim_cur) ||
+ ((current->rlim[RLIMIT_AS].rlim_cur < RLIM_INFINITY) &&
+ ((vma->vm_mm->total_vm << PAGE_SHIFT) + grow
+ > current->rlim[RLIMIT_AS].rlim_cur)))
return -ENOMEM;
vma->vm_start = address;
vma->vm_offset -= grow;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)