cvs commit: src/lib/libc/stdlib malloc.c
jasone at FreeBSD.org
Tue Apr 4 03:51:47 UTC 2006
jasone 2006-04-04 03:51:47 UTC
FreeBSD src repository
Refactor per-run bitmap manipulation functions so that bitmap offsets only
have to be calculated once per allocator operation.
Make nil const.
Update various comments.
Remove/avoid division where possible.
For the one division operation that remains in the critical path, add a
switch statement that has a case for each small size class, and do division
with a constant divisor in each case. This allows the compiler to generate
optimized code that does not use hardware division .
Obtained from: peter 
Revision Changes Path
1.121 +131 -69 src/lib/libc/stdlib/malloc.c
More information about the cvs-src