OSDN Git Service

bionic: allow the board to customize MALLOC_ALIGNMENT
authorJack Ren <jack.ren@intel.com>
Sat, 19 Nov 2011 01:48:03 +0000 (09:48 +0800)
committerElliott Hughes <enh@google.com>
Wed, 9 May 2012 16:52:22 +0000 (09:52 -0700)
commit2fd81ef71c10aecf6583facdd79f8f60f3eed678
tree222e5cabd3f44a359cb3e05e1eb4093087bcb3a9
parentfd95503347acba5c52d669a186ad2b161338a8a7
bionic: allow the board to customize MALLOC_ALIGNMENT

Currently the dlmalloc allocates the memory with 8-byte alignment.
According to the com.aurorasoftworks.quadrant.ui.professional benchmark data:
We can get much better memory performance if we change it to be 16-byte aligned.
For example, On Nexus-S:
8-byte aligned :
    1378 1070  1142 1665 1765  1163 1179  1263  1404 avg: 1336.555555556
16-byte aligned:
    1691 1731  1780 1691 1671  1678 1802  1758  1780 avg: 1731.333333333
                                                    gain: 29.53%

That patch provides flexibity to customize the MALLOC_ALIGNMENT from the
board config.The macro MALLOC_ALIGNMENT defaults to 8.
To change it, please define BOARD_MALLOC_ALIGNMENT in the BoardConfig.mk:
BOARD_MALLOC_ALIGNMENT := <whatever>

Change-Id: I8da0376944a0bbcef1d0fc026bfb6d9125db9739
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
libc/Android.mk