cvs commit: src/lib/libc/stdlib malloc.c

Jason Evans jasone at FreeBSD.org
Fri Mar 24 22:32:15 UTC 2006


Jason Evans wrote:
> jasone      2006-03-24 22:13:49 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libc/stdlib      malloc.c 
>   Log:
>   Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), and
>   determine its value at run time according to other relevant values.  This
>   avoids the creation of runs that are incompletely utilized, as long as
>   pagesize isn't too large (>32kB, given the current RUN_MIN_REGS_2POW
>   setting).
>   
>   Increase the size of several structure bitfields in arena_run_t in order
>   to avoid integer overflow in the case that a run's header does not overlap
>   with the space that is usable as application allocation regions.  Given
>   the tiny_min_2pow change, this fix has no additional impact unless
>   pagesize is >32kB.
>   
>   Reported by:    kris
>   
>   Revision  Changes    Path
>   1.116     +37 -21    src/lib/libc/stdlib/malloc.c
> 
> http://www.FreeBSD.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/malloc.c.diff?&r1=1.115&r2=1.116&f=H

It isn't obvious from the commit log message that this change 
(hopefully) fixes malloc on sparc64, ia64, and alpha, all of which use 
8kB pages.  So, be warned, if you are updating -current for one of those 
architectures, do *not* use revisions 1.112 through 1.115 of 
src/lib/libc/stdlib/malloc.c.

Jason


More information about the cvs-src mailing list