Skip to content
Commit 88a462eb authored by Jaeden Amero's avatar Jaeden Amero
Browse files

utils: Simplify allocation implementation



Do a single allocation for both metadata and data, and align within that
allocation for the start of data. This potentially reduces heap
fragmentation, as fewer allocations of mixed size are done. It also
simplifies freeing of memory and handling of out-of-memory conditions,
as only one allocation is done.

The fake heap free implementation had to be updated to test the simpler
free path. Previously, it was always freeing memory even when passed a
null pointer. Now, we only want it to account for freed memory if a
non-null pointer is passed in.

Signed-off-by: Jaeden Amero's avatarJaeden Amero <jaeden.amero@arm.com>
parent 21f7c933
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment