diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-01-22 08:59:03 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-20 09:59:19 +0100 |
commit | 8bbd04ea8d416b4ec952bf08f572f126ab7b4176 (patch) | |
tree | de93df873d8b27e0aaf454a7d1db5d5e68827519 /payloads/libpayload/sample/hello.c | |
parent | f72d328d1285cfbaef4c0e13199d9e668414e06d (diff) |
libpayload: special case large memalign() requests
For memalign() requests the current allocator keeps metadata
about each chunk of aligned memory that copmrises the size
requested. For large allocations relative to the alignment
this can cause significant metadata overhead. Instead, consider
all memalign() requests whose size meets or exceeds 1KiB or
alignment that meets or exceeds 1KiB large requests.
These requests are handled specially to only allocate
the amount of memory required for the size and alignment
constraints by not allocating any metadata as the whole region
would be consumed by the request.
BUG=None
BRANCH=None
TEST=Built and tested various scenarios. Noted the ability to
free() and properly coalesce the heap as expected.
Change-Id: Ia9cf5529ca859e490617af296cffd2705c2c6fd8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4e32fc57626dac6194c9fd0141df680b4a5417e8
Original-Change-Id: Icdf022831b733e3bb84a2d2f3b499f4e25d89128
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/242456
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/8729
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/sample/hello.c')
0 files changed, 0 insertions, 0 deletions