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

Fix libc heap size calculation for ESP32, use heap adapter #84331

Merged

Conversation

marekmatej
Copy link

@marekmatej marekmatej commented Jan 21, 2025

This PR:

  • fixes the libc heap allocation for ESP32 chips
  • remove ESP heap and transform the heap adapter
  • use kernel heap by default in RF stacks

@zephyrbot zephyrbot added area: C Library C Standard Library size: XS A PR changing only a single line of code labels Jan 21, 2025
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 3142fc0 to 853dbfe Compare January 22, 2025 23:14
@zephyrbot zephyrbot added the platform: ESP32 Espressif ESP32 label Jan 22, 2025
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 853dbfe to 851f3ab Compare January 22, 2025 23:18
@marekmatej marekmatej changed the title libc: common: Kconfig Fix system heap size calc for ESP32 and separate it from the ESP heap Jan 22, 2025
wmrsouza
wmrsouza previously approved these changes Jan 23, 2025
thedjnK
thedjnK previously approved these changes Jan 25, 2025
@marekmatej marekmatej removed the size: XS A PR changing only a single line of code label Jan 25, 2025
wmrsouza
wmrsouza previously approved these changes Jan 26, 2025
sylvioalves
sylvioalves previously approved these changes Jan 28, 2025
@marekmatej marekmatej dismissed stale reviews from sylvioalves, wmrsouza, and thedjnK via 9debbfd January 29, 2025 13:33
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from de5e46b to 9debbfd Compare January 29, 2025 13:33
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch 3 times, most recently from f4e0e99 to 8d16387 Compare January 30, 2025 16:47
@marekmatej marekmatej marked this pull request as ready for review January 30, 2025 21:22
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 8d16387 to 500adf2 Compare January 31, 2025 13:26
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Jan 31, 2025
@marekmatej
Copy link
Author

@stephanosio can you PTAL

@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 500adf2 to e50546c Compare January 31, 2025 14:48
uLipe
uLipe previously approved these changes Feb 3, 2025
cfriedt
cfriedt previously approved these changes Feb 4, 2025
Marek Matej added 2 commits February 4, 2025 20:01
Use proper hal version.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
Change the condition so that ESP32 SoCs are using `_heap_sentry` to
get actual run-time heap size.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
@marekmatej marekmatej dismissed stale reviews from cfriedt and uLipe via 7bb8cd2 February 4, 2025 19:01
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from e50546c to 7bb8cd2 Compare February 4, 2025 19:01
Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.
Update the Wi-Fi and BLE memory needs.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 7bb8cd2 to dbc7fca Compare February 4, 2025 19:03
@marekmatej marekmatej requested review from cfriedt and uLipe February 4, 2025 19:23
@marekmatej marekmatej assigned sylvioalves and unassigned stephanosio Feb 5, 2025
@kartben kartben merged commit 6e6ab2f into zephyrproject-rtos:main Feb 5, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants