Home
last modified time | relevance | path

Searched hist:c62a7972816a3ca689bbda88eafec55b7c87041c (Results 1 – 2 of 2) sorted by relevance

/optee_os/core/mm/
H A Dboot_mem.cc62a7972816a3ca689bbda88eafec55b7c87041c Mon Sep 16 11:43:27 UTC 2024 Jens Wiklander <jens.wiklander@linaro.org> core: boot_mem: keep track of padding

When boot_mem_alloc() allocates memory up to alignment - 1 number of
bytes may have be skipped to satisfy the required alignment of the
returned pointer. If the skipped bytes, or padding, is large enough,
it's recorded in a list of padding. The list of paddings can be
processed and consumed with boot_mem_foreach_padding(). This allows
sufficiently large paddings to be added to for instance the heap instead
of being wasted.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
/optee_os/core/include/kernel/
H A Dboot.hc62a7972816a3ca689bbda88eafec55b7c87041c Mon Sep 16 11:43:27 UTC 2024 Jens Wiklander <jens.wiklander@linaro.org> core: boot_mem: keep track of padding

When boot_mem_alloc() allocates memory up to alignment - 1 number of
bytes may have be skipped to satisfy the required alignment of the
returned pointer. If the skipped bytes, or padding, is large enough,
it's recorded in a list of padding. The list of paddings can be
processed and consumed with boot_mem_foreach_padding(). This allows
sufficiently large paddings to be added to for instance the heap instead
of being wasted.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>