summaryrefslogtreecommitdiffstats
path: root/lib/libalias
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2006-07-01 16:51:10 +0000
committerjasone <jasone@FreeBSD.org>2006-07-01 16:51:10 +0000
commit64896f5bfe82d13c4ef89639922bcbe4bf176ae2 (patch)
tree7ab664d386fc26dc09adecc8061149dea6000e7d /lib/libalias
parentcfa2c683aec5a35f84bceee2684770146d0eb553 (diff)
downloadFreeBSD-src-64896f5bfe82d13c4ef89639922bcbe4bf176ae2.zip
FreeBSD-src-64896f5bfe82d13c4ef89639922bcbe4bf176ae2.tar.gz
Use some math tricks in arena_run_reg_dalloc() to avoid actual division, as
well as avoiding a switch statement. This change has no significant impact to performance when branch prediction is successful at predicting the sizes of objects passed to free(), but in the case that the object sizes are semi-random, this change has the potential to prevent many branch prediction misses, thus improving performance substantially. Take advantage of alignment guarantees in ipalloc(), and pad object sizes to something less than a power of two when possible. This has the potential to substantially reduce internal fragmentation for objects allocated via posix_memalign(). Avoid an unnecessary pow2_ceil() call in arena_ralloc(). Submitted by: djam8193ah@hotmail.com
Diffstat (limited to 'lib/libalias')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud