From ecfd78776d599ab565b3de1148c352a702dd3bcc Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 13 Feb 2020 13:42:33 +0900 Subject: [PATCH] tests: lib: mem_alloc: Increase malloc heap size for newlib test The newlib full malloc implementation (i.e. non-nano) requests a relatively large 4096-byte memory chunk through `_sbrk`, which exceeds the configured 512-byte heap size. This commit changes `CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE` from 512 to 8192 in order to increase the size of the heap memory used by the newlib malloc function. For more details, refer to the issue #21167. Signed-off-by: Stephanos Ioannidis --- tests/lib/mem_alloc/prj_newlib.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/mem_alloc/prj_newlib.conf b/tests/lib/mem_alloc/prj_newlib.conf index 36fb791af63..edf093027c3 100644 --- a/tests/lib/mem_alloc/prj_newlib.conf +++ b/tests/lib/mem_alloc/prj_newlib.conf @@ -1,5 +1,5 @@ CONFIG_ZTEST=y CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_NANO=n -CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE=512 +CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE=8192 CONFIG_TEST_USERSPACE=y