summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-06-20 18:38:28 +0000
committerAlan Cox <alc@FreeBSD.org>2002-06-20 18:38:28 +0000
commit3d66f1384ef146604331689e057fd0033fba593b (patch)
treeb2cd086601bad8bcc80b76b9594edbec99b41791
parent69be5db96f8c2b601874c5c199338f1f2a8ddb99 (diff)
Notes
-rw-r--r--sys/vm/vm_unix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
index 6fcd2c5f3d31a..bf932fd2cf87c 100644
--- a/sys/vm/vm_unix.c
+++ b/sys/vm/vm_unix.c
@@ -85,15 +85,15 @@ obreak(td, uap)
old = base + ctob(vm->vm_dsize);
if (new > base) {
/*
- * We check resource limits here, but alow processes to
- * reduce their usage, even if they remain over the limit.
+ * Check the resource limit, but allow a process to reduce
+ * its usage, even if it remains over the limit.
*/
- if (new > old &&
- (new - base) > (unsigned) td->td_proc->p_rlimit[RLIMIT_DATA].rlim_cur) {
+ if (new - base > td->td_proc->p_rlimit[RLIMIT_DATA].rlim_cur &&
+ new > old) {
error = ENOMEM;
goto done;
}
- if (new >= VM_MAXUSER_ADDRESS) {
+ if (new > VM_MAXUSER_ADDRESS) {
error = ENOMEM;
goto done;
}