Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libc/common: malloc fixes #58450

Merged
merged 2 commits into from
May 31, 2023

Conversation

keith-packard
Copy link
Collaborator

A couple of minor fixes for the common malloc implementation:

  1. Make sure the arena is at least double aligned
  2. Increase default arena to make more tests work.

arm, arc and riscv all have special cases for malloc arena alignment that
might be smaller than the minimum required for a C allocator. In
particular, the riscv value might actually be zero, which turns out to be
an invalid alignment value.

Make sure all of these have alignment that meets the C language
requirements for allocation alignment.

Signed-off-by: Keith Packard <[email protected]>
This matches the size that would be used with the newlib_nano configuration
and allows several tests to complete which would otherwise fail due to
insufficient heap space.

Signed-off-by: Keith Packard <[email protected]>
@nashif nashif merged commit b97a4a5 into zephyrproject-rtos:main May 31, 2023
@keith-packard keith-packard deleted the common-malloc-fixes branch June 1, 2023 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C Library C Standard Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants