From 961647dfd0ba4027e8e81d5e2c13a36facf2a044 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Fri, 19 Sep 2003 07:23:50 +0000 Subject: [PATCH] - Don't abuse M_DEVBUF, define a tag for UMA hashes. --- sys/vm/uma_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index e5057ace65b..f4e117a9b2b 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -100,6 +100,8 @@ static uma_zone_t slabzone; */ static uma_zone_t hashzone; +static MALLOC_DEFINE(M_UMAHASH, "UMAHash", "UMA Hash Buckets"); + /* * Are we allowed to allocate buckets? */ @@ -430,9 +432,8 @@ hash_alloc(struct uma_hash *hash) if (oldsize) { hash->uh_hashsize = oldsize * 2; alloc = sizeof(hash->uh_slab_hash[0]) * hash->uh_hashsize; - /* XXX Shouldn't be abusing DEVBUF here */ hash->uh_slab_hash = (struct slabhead *)malloc(alloc, - M_DEVBUF, M_NOWAIT); + M_UMAHASH, M_NOWAIT); } else { alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT; hash->uh_slab_hash = uma_zalloc_internal(hashzone, NULL, @@ -511,7 +512,7 @@ hash_free(struct uma_hash *hash) uma_zfree_internal(hashzone, hash->uh_slab_hash, NULL, 0); else - free(hash->uh_slab_hash, M_DEVBUF); + free(hash->uh_slab_hash, M_UMAHASH); } /*