summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-10-28 19:01:02 +0000
committerphk <phk@FreeBSD.org>1997-10-28 19:01:02 +0000
commit349f4dfe035d86ca42c2320bc91fc94acd12ce10 (patch)
treec0f84be2a358607b7304807f3e34268284e3e337 /sys/kern/kern_malloc.c
parent1e49b12039a3e0f391576405bb97723f4ad6024b (diff)
downloadFreeBSD-src-349f4dfe035d86ca42c2320bc91fc94acd12ce10.zip
FreeBSD-src-349f4dfe035d86ca42c2320bc91fc94acd12ce10.tar.gz
Remove the long description from the in-kernel datastructure.
Put a magic field in there instead, to help catch uninitialized malloc types.
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 df84db6..6677420 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.35 1997/10/11 13:13:09 phk Exp $
+ * $Id: kern_malloc.c,v 1.36 1997/10/12 20:23:51 phk Exp $
*/
#include <sys/param.h>
@@ -405,6 +405,9 @@ malloc_init(type)
{
int npg;
+ if (type->ks_magic != M_MAGIC)
+ panic("malloc type lacks magic");
+
/*
* Limit maximum memory for each type to 60% of malloc area size or
* 60% of physical memory, whichever is smaller.
OpenPOWER on IntegriCloud