diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-04-12 21:58:59 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-04-12 21:58:59 +0000 |
commit | dbd51c416a80ff9953c4bfdb266673628b21303c (patch) | |
tree | e14e1c9a86fe828884446fb30d576c9356de12bb | |
parent | fdf288f39db2daef815b44d09686043cf498cfae (diff) | |
download | src-dbd51c416a80ff9953c4bfdb266673628b21303c.tar.gz src-dbd51c416a80ff9953c4bfdb266673628b21303c.zip |
realloc(9): Move slab and zone under #ifndef DEBUG_REDZONE.
-rw-r--r-- | sys/kern/kern_malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 4ecdcdacce01..eb70e4e6cd57 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -986,8 +986,10 @@ zfree(void *addr, struct malloc_type *mtp) void * realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) { +#ifndef DEBUG_REDZONE uma_zone_t zone; uma_slab_t slab; +#endif unsigned long alloc; void *newaddr; @@ -1011,8 +1013,6 @@ realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) #endif #ifdef DEBUG_REDZONE - slab = NULL; - zone = NULL; alloc = redzone_get_size(addr); #else vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); |