diff options
author | phk <phk@FreeBSD.org> | 2003-07-22 10:24:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-07-22 10:24:41 +0000 |
commit | c4a9334fa698660a5dd1a0c4fddb61ed0893fc58 (patch) | |
tree | 822136a990d18001b2db563f705887b258e810ce /sys/kern/kern_malloc.c | |
parent | b5408a3e8f054d75ddbda2e0f17add2667916d6d (diff) | |
download | FreeBSD-src-c4a9334fa698660a5dd1a0c4fddb61ed0893fc58.zip FreeBSD-src-c4a9334fa698660a5dd1a0c4fddb61ed0893fc58.tar.gz |
Don't attempt to inline large functions mb_alloc() and mb_free(),
it more than doubles the text size of this file.
GCC has wisely ignored us on this previously
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index a90d628..691b211 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -272,14 +272,16 @@ out: * This routine may not block. */ void -free(addr, type) - void *addr; +free(arg, type) + void const *arg; struct malloc_type *type; { register struct malloc_type *ksp = type; uma_slab_t slab; u_long size; + void *addr; + addr = __DECONST(void *, arg); /* free(NULL, ...) does nothing */ if (addr == NULL) return; @@ -387,7 +389,8 @@ reallocf(addr, size, type, flags) { void *mem; - if ((mem = realloc(addr, size, type, flags)) == NULL) + mem = realloc(addr, size, type, flags); + if (mem == NULL) free(addr, type); return (mem); } |