1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

Get rid of MALLOC_INSTANTIATE and MALLOC_MAKE_TYPE(). Just handle the 3

malloc types declared in <sys/malloc.h> like other global malloc types.
This commit is contained in:
Bruce Evans 1999-09-11 16:41:39 +00:00
parent 0e9857132a
commit 9ef246c682
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51167
2 changed files with 7 additions and 12 deletions

View File

@ -39,7 +39,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#define MALLOC_INSTANTIATE
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/vmmeter.h>
@ -52,6 +51,10 @@
#include <vm/pmap.h>
#include <vm/vm_map.h>
MALLOC_DEFINE(M_CACHE, "namecache", "Dynamically allocated cache entries");
MALLOC_DEFINE(M_DEVBUF, "devbuf", "device driver memory");
MALLOC_DEFINE(M_TEMP, "temp", "misc temporary data buffers");
static void kmeminit __P((void *));
SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL)

View File

@ -81,17 +81,9 @@ void malloc_uninit __P((void *));
#define MALLOC_DECLARE(type) \
extern struct malloc_type type[1]
#ifdef MALLOC_INSTANTIATE
#define MALLOC_MAKE_TYPE(type, shortdesc, longdesc) \
MALLOC_DEFINE(type, shortdesc, longdesc)
#else
#define MALLOC_MAKE_TYPE(type, shortdesc, longdesc) \
MALLOC_DECLARE(type)
#endif
MALLOC_MAKE_TYPE(M_CACHE, "namecache", "Dynamically allocated cache entries");
MALLOC_MAKE_TYPE(M_DEVBUF, "devbuf", "device driver memory");
MALLOC_MAKE_TYPE(M_TEMP, "temp", "misc temporary data buffers");
MALLOC_DECLARE(M_CACHE);
MALLOC_DECLARE(M_DEVBUF);
MALLOC_DECLARE(M_TEMP);
#endif /* KERNEL */
/*