summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-02-03 01:27:09 +0000
committermillert <millert@openbsd.org>1998-02-03 01:27:09 +0000
commite900561df85a1a47a6021067614433303ee71ea2 (patch)
tree5730036dcbd2aef7a0167f579a28f77e9f6e4156
parentUse short dash, not long dash, so makewhatis.sed doesn't get confused. (diff)
downloadwireguard-openbsd-e900561df85a1a47a6021067614433303ee71ea2.tar.xz
wireguard-openbsd-e900561df85a1a47a6021067614433303ee71ea2.zip
Fix the non-MACHINE_NONCONTIG case for Jason's fix.
-rw-r--r--sys/vm/vm_map.c6
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;