Because of the number of kernel map entries being to small
and an inappropriate calculation for the number of buffer pages, it was
possible for the kernel to hang if you had more than 8 Meg of memory
installed in your system.
AUTHOR: William Jolitz (withheld)
386BSD-Patchkit: patch00002
* SUCH DAMAGE.
*
* @(#)machdep.c 7.4 (Berkeley) 6/3/91
* SUCH DAMAGE.
*
* @(#)machdep.c 7.4 (Berkeley) 6/3/91
+ *
+ * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
+ * -------------------- ----- ----------------------
+ * CURRENT PATCH LEVEL: 1 00002
+ * -------------------- ----- ----------------------
+ *
+ * 15 Aug 92 William Jolitz Large memory bug
*/
static char rcsid[] = "$Header: /usr/src/sys.386bsd/i386/i386/RCS/machdep.c,v 1.2 92/01/21 14:22:09 william Exp Locker: root $";
*/
static char rcsid[] = "$Header: /usr/src/sys.386bsd/i386/i386/RCS/machdep.c,v 1.2 92/01/21 14:22:09 william Exp Locker: root $";
bufpages = physmem / 10 / CLSIZE;
else
bufpages = ((2 * 1024 * 1024 + physmem) / 20) / CLSIZE;
bufpages = physmem / 10 / CLSIZE;
else
bufpages = ((2 * 1024 * 1024 + physmem) / 20) / CLSIZE;
+ /*
+ * 15 Aug 92 William Jolitz bufpages fix for too large
+ */
+ bufpages = min( NKMEMCLUSTERS/2, bufpages);
+
if (nbuf == 0) {
nbuf = bufpages / 2;
if (nbuf < 16)
if (nbuf == 0) {
nbuf = bufpages / 2;
if (nbuf < 16)
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
+ *
+ * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
+ * -------------------- ----- ----------------------
+ * CURRENT PATCH LEVEL: 1 00002
+ * -------------------- ----- ----------------------
+ *
+ * 15 Aug 92 William Jolitz Prevent running out of map entries...
/* XXX: number of kernel maps and entries to statically allocate */
#define MAX_KMAP 10
/* XXX: number of kernel maps and entries to statically allocate */
#define MAX_KMAP 10
+
+#ifdef OMIT
+#define MAX_KMAPENT 500
+#else /* !OMIT*/
+#define MAX_KMAPENT 1000 /* 15 Aug 92*/
+#endif /* !OMIT*/