Some fixes from John Hood:

1) Fix the initialization of malloc structure that changed
		due to perf opt.
	2) Remove unneeded include.
	3) An initialization assert added to malloc.
Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
This commit is contained in:
John Dyson 1997-12-05 05:36:58 +00:00
parent fc018b804b
commit d4060a8751
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31549
3 changed files with 8 additions and 5 deletions

View File

@ -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>

View File

@ -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.

View File

@ -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) \