-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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/picolibc: Don't enable malloc by default #63259
Closed
keith-packard
wants to merge
18
commits into
zephyrproject-rtos:main
from
keith-packard:no-malloc-default
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6c50f28
tests/mem_alloc: Make tests labeled 'minimal' use the minimal C library
keith-packard e8f0d51
tests/mem_alloc: Skip minimal C library tests on full libc targets
keith-packard 2328c5e
libc: Add REQUIRES_MALLOC to indirectly select malloc support
keith-packard d086012
libc: Add REQUIRED_MALLOC_ARENA_SIZE to indirectly request heap size
keith-packard 9a34e08
lib/cpp: Imply REQUIRES_MALLOC when using C++
keith-packard 567d231
net/sockets: Add REQUIRES_MALLOC when needed in sockets
keith-packard 71c2230
fs/littlefs: Add REQUIRES_MALLOC when using littlefs
keith-packard e1efe60
modules: Add REQUIRES_MALLOC to various modules
keith-packard 17ce908
modules/mcux: Add REQUIRES_MALLOC
keith-packard f28c25a
soc/renasas_smartbond: Add REQUIRES_MALLOC to the da1469x configuration
keith-packard c984dbf
samples,tests: Add REQUIRES_MALLOC=y to hash_map tests
keith-packard 25d652f
samples/ivshmem: Add CONFIG_REQUIRES_MALLOC=y
keith-packard fd8467f
samples/maxim_ds3231: Add REQUIRES_MALLOC (for strftime)
keith-packard f9fb0aa
tests/cmsis: Add REQUIRES_MALLOC
keith-packard c7b0366
tests/cmsis_nn: Add REQUIRES_MALLOC
keith-packard 769d81c
tests/basicmath: Add REQUIRES_MALLOC
keith-packard bd3da72
libc/minimal: Select common malloc when applications require it
keith-packard 6a901af
libc/picolibc: Only enable malloc when required
keith-packard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ CONFIG_SYS_HASH_FUNC32=y | |
CONFIG_SYS_HASH_MAP=y | ||
|
||
CONFIG_TEST_LIB_HASH_MAP_MAX_ENTRIES=40 | ||
|
||
CONFIG_REQUIRES_MALLOC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ CONFIG_POLL=y | |
CONFIG_VIRTUALIZATION=y | ||
CONFIG_IVSHMEM=y | ||
CONFIG_IVSHMEM_DOORBELL=y | ||
|
||
CONFIG_REQUIRES_MALLOC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
menuconfig NET_SOCKETS | ||
bool "BSD Sockets compatible API" | ||
select FDTABLE | ||
select REQUIRES_MALLOC if DNS_RESOLVER || NET_IP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. technically, getaddrinfo and freeaddrinfo could maybe use a slab if malloc is unavailable. What do you think @rlubos ? Not a change required here, but maybe a good future enhancement. Even malloc-less systems should be able to resolve. |
||
help | ||
Provide BSD Sockets like API on top of native Zephyr networking API. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_ZTEST=y | ||
CONFIG_REQUIRES_FULL_LIBC=y | ||
CONFIG_CMSIS_DSP=y | ||
CONFIG_REQUIRES_MALLOC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_ZTEST=y | ||
CONFIG_REQUIRES_FULL_LIBC=y | ||
CONFIG_CMSIS_DSP=y | ||
CONFIG_REQUIRES_MALLOC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_ZTEST=y | ||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=2048 | ||
CONFIG_TEST_USERSPACE=y | ||
CONFIG_MINIMAL_LIBC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_ZTEST=y | ||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0 | ||
CONFIG_TEST_USERSPACE=y | ||
CONFIG_MINIMAL_LIBC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_ZTEST=y | ||
CONFIG_PICOLIBC=y | ||
CONFIG_TEST_USERSPACE=y | ||
CONFIG_REQUIRES_MALLOC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ CONFIG_REQUIRES_FULL_LIBC=y | |
CONFIG_DSP=y | ||
CONFIG_CMSIS_DSP=y | ||
CONFIG_DSP_BACKEND_CMSIS=y | ||
CONFIG_REQUIRES_MALLOC=y |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day, It would be cool to not require a global allocator for Thrift