diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-02-03 01:27:10 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-02-03 01:27:10 +0000 |
commit | b5899a909f89399992e6ff9a26ee0f21e9968a38 (patch) | |
tree | dba98936256104f32e291b0f336d1e34b303bd3f /sys | |
parent | 48c06a51954fc6a5feb80ae5f355a501f04315e8 (diff) |
Fix the non-MACHINE_NONCONTIG case for Jason's fix.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_map.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 4d8c849e772..9c9aca5d679 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_map.c,v 1.11 1998/02/02 20:14:06 downsj Exp $ */ +/* $OpenBSD: vm_map.c,v 1.12 1998/02/03 01:27:09 millert Exp $ */ /* $NetBSD: vm_map.c,v 1.23 1996/02/10 00:08:08 christos Exp $ */ /* @@ -197,7 +197,11 @@ vmspace_alloc(min, max, pageable) register struct vmspace *vm; if (mapvmpgcnt == 0 && mapvm == 0) { +#ifndef MACHINE_NONCONTIG + mapvmpgcnt = ((last_page-first_page) * sizeof(struct vm_map_entry) + PAGE_SIZE - 1) / PAGE_SIZE; +#else mapvmpgcnt = (vm_page_count * sizeof(struct vm_map_entry) + PAGE_SIZE - 1) / PAGE_SIZE; +#endif mapvm_start = mapvm = kmem_alloc_pageable(kernel_map, mapvmpgcnt * PAGE_SIZE); mapvmmax = mapvm_start + mapvmpgcnt * PAGE_SIZE; |