Use alignment macros, pagesize and powerof2.
commit8a35c3fe122d49ba76dff815b3537affb5a50b45
authorCarlos O'Donell <carlos@systemhalted.org>
Wed, 18 Feb 2015 00:25:01 +0000 (17 19:25 -0500)
committerCarlos O'Donell <carlos@systemhalted.org>
Wed, 18 Feb 2015 00:29:15 +0000 (17 19:29 -0500)
tree37fba229a2f0557ffdfd8ee431f499888aea4a16
parent1a2325c06cf309d1d8b4aafcfb1a3d43905baf9b
Use alignment macros, pagesize and powerof2.

We are replacing all of the bespoke alignment code with
ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN.
This cleans up malloc/malloc.c, malloc/arena.c, and
elf/dl-reloc.c. It also makes all the code consistently
use pagesize, and powerof2 as required.

Code size is reduced with the removal of precomputed
pagemask, and use of pagesize instead. No measurable
difference in performance.

No regressions on x86_64.
ChangeLog
elf/dl-reloc.c
malloc/arena.c
malloc/malloc.c