summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_dbg.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-09-19 08:37:44 +0000
committerjeff <jeff@FreeBSD.org>2003-09-19 08:37:44 +0000
commit30f275bb51052e65e8026d2e1d80eb711f88f029 (patch)
tree644475a574eabecce93510f93324e58118426825 /sys/vm/uma_dbg.c
parent758f95abc69f45ea012ea1848903bf92b5361f92 (diff)
downloadFreeBSD-src-30f275bb51052e65e8026d2e1d80eb711f88f029.zip
FreeBSD-src-30f275bb51052e65e8026d2e1d80eb711f88f029.tar.gz
- Fix the silly flag situation in UMA. Remove redundant ZFLAG/ZONE flags
by accepting the user supplied flags directly. Previously this was not done so that flags for the same field would not be defined in two different files. Add comments in each header instructing future developers on how now to shoot their feet. - Fix a test for !OFFPAGE which should have been a test for HASH. This would have caused a panic if we had ever destructed a malloc zone. This also opens up the possibility that other zones could use the vsetobj() method rather than a hash.
Diffstat (limited to 'sys/vm/uma_dbg.c')
-rw-r--r--sys/vm/uma_dbg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/uma_dbg.c b/sys/vm/uma_dbg.c
index b69cee0..1bed4ed 100644
--- a/sys/vm/uma_dbg.c
+++ b/sys/vm/uma_dbg.c
@@ -195,9 +195,9 @@ uma_dbg_getslab(uma_zone_t zone, void *item)
u_int8_t *mem;
mem = (u_int8_t *)((unsigned long)item & (~UMA_SLAB_MASK));
- if (zone->uz_flags & UMA_ZFLAG_MALLOC) {
+ if (zone->uz_flags & UMA_ZONE_MALLOC) {
slab = vtoslab((vm_offset_t)mem);
- } else if (zone->uz_flags & UMA_ZFLAG_HASH) {
+ } else if (zone->uz_flags & UMA_ZONE_HASH) {
slab = hash_sfind(&zone->uz_hash, mem);
} else {
mem += zone->uz_pgoff;
OpenPOWER on IntegriCloud