summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ddb/db_input.c3
-rw-r--r--sys/kern/kern_malloc.c5
-rw-r--r--sys/sys/malloc.h5
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c
index 453052a..857afd6 100644
--- a/sys/ddb/db_input.c
+++ b/sys/ddb/db_input.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_input.c,v 1.21 1997/11/09 06:30:29 msmith Exp $
+ * $Id: db_input.c,v 1.22 1997/11/20 16:53:23 bde Exp $
*/
/*
@@ -32,7 +32,6 @@
*/
#include <sys/param.h>
-#include <sys/malloc.h>
#include <sys/systm.h>
#include <machine/cons.h>
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.
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index f0c31f4..2c1d493 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)malloc.h 8.5 (Berkeley) 5/3/95
- * $Id: malloc.h,v 1.31 1997/10/28 19:01:02 phk Exp $
+ * $Id: malloc.h,v 1.32 1997/12/04 07:29:17 davidg Exp $
*/
#ifndef _SYS_MALLOC_H_
@@ -63,7 +63,8 @@ struct malloc_type {
};
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
- struct malloc_type type[1] = { { shortdesc, M_MAGIC } }; \
+ struct malloc_type type[1] = { { NULL, 0, 0, 0, 0, 0, 0, \
+ M_MAGIC, shortdesc, 0, 0 } }; \
struct __hack
#define MALLOC_DECLARE(type) \
OpenPOWER on IntegriCloud