diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 3609db74c3d6..9388ebca48c2 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.29 1994/06/29 06:32:41 cgd Exp $ */ +/* $NetBSD: kern_sig.c,v 1.30 1994/08/23 22:07:42 deraadt Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -1170,7 +1170,7 @@ coredump(p) if (pcred->p_svuid != pcred->p_ruid || pcred->p_svgid != pcred->p_rgid) return (EFAULT); - if (ctob(UPAGES + vm->vm_dsize + vm->vm_ssize) >= + if (USPACE + ctob(vm->vm_dsize + vm->vm_ssize) >= p->p_rlimit[RLIMIT_CORE].rlim_cur) return (EFAULT); sprintf(name, "%s.core", p->p_comm); @@ -1214,7 +1214,7 @@ coredump(p) * the core header. */ if (core.c_cpusize == 0) - core.c_cpusize = NBPG * UPAGES; /* Just in case */ + core.c_cpusize = USPACE; /* Just in case */ error = vn_rdwr(UIO_WRITE, vp, vm->vm_daddr, (int)core.c_dsize, (off_t)core.c_cpusize, UIO_USERSPACE, diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 7e2652c9f7dd..92afa2e5aafb 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_glue.c,v 1.39 1994/06/29 06:47:57 cgd Exp $ */ +/* $NetBSD: vm_glue.c,v 1.40 1994/08/23 22:09:22 deraadt Exp $ */ /* * Copyright (c) 1991, 1993 @@ -229,17 +229,17 @@ vm_fork(p1, p2, isvfork) /* * Allocate a wired-down (for now) pcb and kernel stack for the process */ - addr = kmem_alloc_pageable(kernel_map, ctob(UPAGES)); + addr = kmem_alloc_pageable(kernel_map, USPACE); if (addr == 0) panic("vm_fork: no more kernel virtual memory"); - vm_map_pageable(kernel_map, addr, addr + ctob(UPAGES), FALSE); + vm_map_pageable(kernel_map, addr, addr + USPACE, FALSE); #else /* * XXX somehow, on 386, ocassionally pageout removes active, wired down * kstack and pagetables, WITHOUT going thru vm_page_unwire! Why this * appears to work is not yet clear, yet it does... */ - addr = kmem_alloc(kernel_map, ctob(UPAGES)); + addr = kmem_alloc(kernel_map, USPACE); if (addr == 0) panic("vm_fork: no more kernel virtual memory"); #endif @@ -366,7 +366,7 @@ noswap: * This part is really bogus cuz we could deadlock on memory * despite our feeble check. */ - size = round_page(ctob(UPAGES)); + size = round_page(USPACE); addr = (vm_offset_t) p->p_addr; if (cnt.v_free_count > atop(size)) { #ifdef DEBUG @@ -463,10 +463,10 @@ swapout_threads() * If we didn't get rid of any real duds, toss out the next most * likely sleeping/stopped or running candidate. We only do this * if we are real low on memory since we don't gain much by doing - * it (UPAGES pages). + * it (USPACE bytes). */ if (didswap == 0 && - cnt.v_free_count <= atop(round_page(ctob(UPAGES)))) { + cnt.v_free_count <= atop(round_page(USPACE))) { if ((p = outp) == 0) p = outp2; #ifdef DEBUG @@ -491,7 +491,7 @@ swapout(p) p->p_pid, p->p_comm, p->p_addr, p->p_stat, p->p_slptime, cnt.v_free_count); #endif - size = round_page(ctob(UPAGES)); + size = round_page(USPACE); addr = (vm_offset_t) p->p_addr; #ifdef notyet /* XXX GC -- enable swapping! */ #ifdef m68k