Skip to content

Conversation

@keith-packard
Copy link
Contributor

This will (eventually) permit use of a common malloc implementation with
other C libraries, reducing the amount of Zephyr-specific code required
to support each C library.

This doesn't change the malloc implementation, it just moves the code and renames the
configuration variables.

Closes: #56243

galak
galak previously requested changes Mar 29, 2023
Copy link
Contributor

@galak galak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move all the Kconfig's in zephyr from MINIMAL_LIBC_MALLOC_* -> to COMMON_LIBC_MALLOC_*.

also document deprecation of the MINIMAL_LIBC_MALLOC_* Kconfigs in release notes

@keith-packard
Copy link
Contributor Author

We should move all the Kconfig's in zephyr from MINIMAL_LIBC_MALLOC_* -> to COMMON_LIBC_MALLOC_*.

Thanks, I can do that.

also document deprecation of the MINIMAL_LIBC_MALLOC_* Kconfigs in release notes

Sounds good.

@keith-packard
Copy link
Contributor Author

We should move all the Kconfig's in zephyr from MINIMAL_LIBC_MALLOC_* -> to COMMON_LIBC_MALLOC_*.

Done.

also document deprecation of the MINIMAL_LIBC_MALLOC_* Kconfigs in release notes

Not sure where these get added?

@keith-packard
Copy link
Contributor Author

Lots of updates to clean up this series -- I've got another series stacked on top that switches picolibc -- https://github.com/keith-packard/zephyr/tree/picolibc-common-malloc -- but that required significant logic changes in how the heap is allocated to get alignment and 'use all memory' stuff working. I'll wait to submit that until this series is done, but if anyone is interested in where this is going, that should make it more clear.

@stephanosio stephanosio merged commit 4134858 into zephyrproject-rtos:main Apr 27, 2023
@keith-packard keith-packard deleted the common-malloc branch April 27, 2023 13:28
tejlmand added a commit to tejlmand/fw-nrfconnect-nrf that referenced this pull request Sep 24, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 25, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 25, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 25, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 26, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 26, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 26, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 27, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 27, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 27, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 30, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Sep 30, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 1, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 2, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 2, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 2, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 4, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-nrf that referenced this pull request Oct 4, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
carlescufi pushed a commit to nrfconnect/sdk-nrf that referenced this pull request Oct 4, 2024
MINIMAL_LIBC_MALLOC has been deprecated and removed in favor of
COMMON_LIBC_MALLOC, therefore change CONFIG_MINIMAL_LIBC_MALLOC=n to
CONFIG_COMMON_LIBC_MALLOC=n.

Ref: zephyrproject-rtos/zephyr#56309
     zephyrproject-rtos/zephyr#74322

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Base OS Base OS Library (lib/os) area: Bluetooth area: C Library C Standard Library area: C++ area: Documentation area: File System area: hash utils Hash Functions and Hash Maps (Hash Tables) area: Networking area: USB Universal Serial Bus Release Notes To be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libc no sources given warning emitted for all builds

9 participants