Skip to content

Commit 19e4cb8

Browse files
ycsinnashif
authored andcommitted
libc: cleanup deprecated heap-related Kconfigs
The following heap-related Kconfigs shared by the picolibc & minimal libc have been deprecated for more than 2 releases, remove them and update the Kconfigs accordingly: - `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE` - `CONFIG_MINIMAL_LIBC_REALLOCARRAY` Cleanup the handling to support the deprecated malloc arena size configuration values. Signed-off-by: Yong Cong Sin <[email protected]>
1 parent c22c98e commit 19e4cb8

File tree

12 files changed

+9
-47
lines changed

12 files changed

+9
-47
lines changed

boards/silabs/dev_kits/xg24_dk2601b/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if BT
2727
config FPU
2828
default y
2929

30-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
30+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3131
default 8192
3232

3333
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4104a/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4161a/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4170a/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4180a/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4250b/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/slwrb4255a/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

boards/silabs/radio_boards/xg24_rb4187c/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if BT
3232
config FPU
3333
default y
3434

35-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
35+
config COMMON_LIBC_MALLOC_ARENA_SIZE
3636
default 8192
3737

3838
config MAIN_STACK_SIZE

include/zephyr/sys/libc-hooks.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ __syscall size_t zephyr_fwrite(const void *ZRESTRICT ptr, size_t size,
4444

4545
#endif /* CONFIG_NEWLIB_LIBC */
4646

47-
/* Handle deprecated malloc arena size configuration values */
48-
#ifdef CONFIG_COMMON_LIBC_MALLOC
49-
# if defined(CONFIG_MINIMAL_LIBC) && (CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE != -2)
50-
# undef CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
51-
# define CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE
52-
# warning Using deprecated setting CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE
53-
# elif defined(CONFIG_PICOLIBC) && (CONFIG_PICOLIBC_HEAP_SIZE != -2)
54-
# undef CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
55-
# define CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE CONFIG_PICOLIBC_HEAP_SIZE
56-
# warning Using deprecated setting CONFIG_PICOLIBC_HEAP_SIZE
57-
# endif
58-
#endif
59-
6047
#ifdef CONFIG_USERSPACE
6148
#ifdef CONFIG_COMMON_LIBC_MALLOC
6249

lib/libc/minimal/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ config MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS
1313
library memory partition when CONFIG_USERSPACE=y, and enabling this
1414
option may require an additional memory protection region.
1515

16-
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
17-
int "[DEPRECATED] Size of the minimal libc malloc arena"
18-
default -2
19-
depends on COMMON_LIBC_MALLOC
20-
help
21-
[DEPRECATED] Use COMMON_LIBC_MALLOC_ARENA_SIZE
22-
23-
Indicate the size in bytes of the memory arena used for common C
24-
library malloc() implementation when using the minimal C library.
25-
26-
If set to -2, then the value of COMMON_LIBC_MALLOC_ARENA_SIZE
27-
will be used.
28-
2916
config MINIMAL_LIBC_LL_PRINTF
3017
bool "Build with minimal libc long long printf" if !64BIT
3118
default y if 64BIT

0 commit comments

Comments
 (0)