Skip to content
Commit 2208844f authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Kumar Gala
Browse files

lib: newlib: Add workaround for #38258



For the Xtensa platforms (e.g. qemu_xtensa), the first `malloc` call
may fail if the newlib heap base address is such that the first `sbrk`
call returns a 4096-byte aligned address.

Here we add a workaround for Xtensa that allocates and immediately
frees a 16-byte memory block during initialisation so that all
subsequent `malloc` calls succeed.

This commit needs to be reverted once the issue #38258 is fixed.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent 529d9149
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment