Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/include Fix integer overflow in calculation of...



details:   https://anonhg.NetBSD.org/src/rev/0e4b90833db6
branches:  trunk
changeset: 488114:0e4b90833db6
user:      castor <castor%NetBSD.org@localhost>
date:      Sun Jun 18 18:29:04 2000 +0000

description:
Fix integer overflow in calculation of VM_MAX_KERNEL_BUF.

diffstat:

 sys/arch/i386/include/vmparam.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r a00c96bebf92 -r 0e4b90833db6 sys/arch/i386/include/vmparam.h
--- a/sys/arch/i386/include/vmparam.h   Sun Jun 18 16:16:34 2000 +0000
+++ b/sys/arch/i386/include/vmparam.h   Sun Jun 18 18:29:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.36 2000/02/11 19:25:15 thorpej Exp $     */
+/*     $NetBSD: vmparam.h,v 1.37 2000/06/18 18:29:04 castor Exp $      */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -117,7 +117,7 @@
 /* XXX max. amount of KVM to be used by buffers. */
 #ifndef VM_MAX_KERNEL_BUF
 #define VM_MAX_KERNEL_BUF \
-       ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) * 7 / 10)
+       ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 1024 * 7 / 10 * 1024)
 #endif
 
 /* virtual sizes (bytes) for various kernel submaps */



Home | Main Index | Thread Index | Old Index