diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2009-01-25 09:11:24 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2009-01-25 09:11:24 +0000 |
| commit | e20a199fd56de5996c0a3f101b0569c0722816b0 (patch) | |
| tree | 816ddb03fae2b243e6596d085b68de89f1198131 /sys/kern/kern_malloc.c | |
| parent | 30bf032c76d53844a870d9b3c5409482d5882a3e (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_malloc.c')
| -rw-r--r-- | sys/kern/kern_malloc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 54434e238dd0..02a1e7ece6a9 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -329,7 +329,6 @@ malloc(unsigned long size, struct malloc_type *mtp, int flags) int indx; caddr_t va; uma_zone_t zone; - uma_keg_t keg; #if defined(DIAGNOSTIC) || defined(DEBUG_REDZONE) unsigned long osize = size; #endif @@ -378,18 +377,16 @@ malloc(unsigned long size, struct malloc_type *mtp, int flags) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; zone = kmemzones[indx].kz_zone; - keg = zone->uz_keg; #ifdef MALLOC_PROFILE krequests[size >> KMEM_ZSHIFT]++; #endif va = uma_zalloc(zone, flags); if (va != NULL) - size = keg->uk_size; + size = zone->uz_size; malloc_type_zone_allocated(mtp, va == NULL ? 0 : size, indx); } else { size = roundup(size, PAGE_SIZE); zone = NULL; - keg = NULL; va = uma_large_malloc(size, flags); malloc_type_allocated(mtp, va == NULL ? 0 : size); } |
