CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2009/08/25 11:59:45

Modified files:
        sys/kern       : kern_malloc.c 
        sys/sys        : malloc.h 

Log message:
The BUCKETINDX() giant macro is used to compute the base 2 logarithm of its
input, in order to pick the appropriate malloc() bucket.

Replace it with an inline function in kern_malloc.c, which will either
do a tightest-but-slower loop (if option SMALL_KERNEL), or a geometric search
equivalent to what the macro does, but producing smaller code (especially on
platforms which can not load large constants in one instruction).

Reply via email to