summaryrefslogtreecommitdiff
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2000-10-20 07:29:16 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2000-10-20 07:29:16 +0000
commiteec258d257d2ef203f45cb566fcb4a33b62f4aac (patch)
tree0f0a13ee369bff1dca21e8a90013c0e8e910e585 /sys/kern/kern_malloc.c
parentd8881ca31de096d8110fca3f25a44f9ad6c64999 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 921942843727..a2e77fdfd93a 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -41,11 +41,10 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/mutex.h>
#include <sys/vmmeter.h>
#include <sys/lock.h>
-#include <machine/mutex.h>
-
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_kern.h>
@@ -75,7 +74,7 @@ static struct kmemusage *kmemusage;
static char *kmembase;
static char *kmemlimit;
-struct mtx malloc_mtx;
+MUTEX_DECLARE(static, malloc_mtx);
u_int vm_kmem_size;
@@ -437,7 +436,7 @@ kmeminit(dummy)
#error "kmeminit: MAXALLOCSAVE too small"
#endif
- mtx_init(&malloc_mtx, "malloc", MTX_DEF);
+ mtx_init(&malloc_mtx, "malloc", MTX_DEF | MTX_COLD);
/*
* Try to auto-tune the kernel memory size, so that it is