summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 6677420..d32a756 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
- * $Id: kern_malloc.c,v 1.36 1997/10/12 20:23:51 phk Exp $
+ * $Id: kern_malloc.c,v 1.37 1997/10/28 19:00:53 phk Exp $
*/
#include <sys/param.h>
@@ -408,6 +408,9 @@ malloc_init(type)
if (type->ks_magic != M_MAGIC)
panic("malloc type lacks magic");
+ if (cnt.v_page_count == 0)
+ panic("malloc_init not allowed before vm init");
+
/*
* Limit maximum memory for each type to 60% of malloc area size or
* 60% of physical memory, whichever is smaller.
OpenPOWER on IntegriCloud