aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2002-09-15 17:10:18 +0000
committerBruce Evans <bde@FreeBSD.org>2002-09-15 17:10:18 +0000
commitbb5603ae9e1cff78cee69f88b41ac20b7922c13a (patch)
tree3c4696e833b3e781128c4655203dfa61f6b5d08c /sys
parent54384cf3b09666a9d10902735fcb3ef9cd6b5faf (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/malloc.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index 9a46e9292921..b909d2efa010 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -41,9 +41,7 @@
#include <sys/_lock.h>
#include <sys/_mutex.h>
-#define splmem splhigh
-
-#define MINALLOCSIZE UMA_SMALLEST_UNIT
+#define MINALLOCSIZE UMA_SMALLEST_UNIT
/*
* flags to malloc.
@@ -52,7 +50,7 @@
#define M_NOWAIT 0x0001 /* do not block */
#define M_USE_RESERVE 0x0002 /* can alloc out of reserve memory */
#define M_ZERO 0x0004 /* bzero the allocation */
-#define M_NOVM 0x0008 /* Don't ask the VM for pages */
+#define M_NOVM 0x0008 /* don't ask VM for pages */
#define M_MAGIC 877983977 /* time when first defined :-) */
@@ -65,11 +63,9 @@ struct malloc_type {
u_long ks_maxused; /* maximum number ever used */
u_long ks_magic; /* if it's not magic, don't touch it */
const char *ks_shortdesc; /* short description */
- struct mtx ks_mtx; /* Lock for stats */
+ struct mtx ks_mtx; /* lock for stats */
};
-extern struct mtx malloc_mtx;
-
#ifdef _KERNEL
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
struct malloc_type type[1] = { \
@@ -102,6 +98,8 @@ MALLOC_DECLARE(M_IP6NDP); /* for INET6 */
*/
MALLOC_DECLARE(M_IOV);
+extern struct mtx malloc_mtx;
+
/* XXX struct malloc_type is unused for contig*(). */
void contigfree(void *addr, unsigned long size, struct malloc_type *type);
void *contigmalloc(unsigned long size, struct malloc_type *type, int flags,