diff options
author | Ryan Prichard <rprichard@google.com> | 2019-01-24 15:22:50 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2019-01-25 15:31:35 -0800 |
commit | 96773a2daf8d11f2d95801935e26f71eb0265559 (patch) | |
tree | 44a8da51e6b6acfb7054830a44e23b00d82afefc /libc/malloc_hooks/malloc_hooks.cpp | |
parent | 083d850b30c5eb29c16500bca934d7f6682e4aaa (diff) |
Add BionicAllocator::memalign
Bionic needs this functionality to allocate a TLS segment with greater
than 16-byte alignment. For simplicity, this allocator only supports up
to one page of alignment.
The memory layout changes slightly when allocating an object of exactly
PAGE_SIZE alignment. Instead of allocating the page_info header at the
start of the page containing the pointer, it is allocated at the start
of the preceding page.
Bug: http://b/78026329
Test: linker-unit-tests{32,64}
Change-Id: I1c8d1cd7ca72d113bced5ee15ba8d831426b0081
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions