Skip to content

Commit 05c2f88

Browse files
maass-hamburgdpgeorge
authored andcommitted
zephyr/main: Put GC heap in noinit linker area.
By putting the heap in the noinit area instead of the bss area, zephyr won't memset it to zero during start. This improves startup time, in particular if the heap is very big. The system heap of zephyr is also in the same section. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent 92d64ca commit 05c2f88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/zephyr/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ DT_FOREACH_STATUS_OKAY(micropython_heap, MICROPY_HEAP_DEFINE)
8383
#include "modmachine.h"
8484
#include "modzephyr.h"
8585

86-
static char heap[MICROPY_HEAP_SIZE];
86+
static __noinit char heap[MICROPY_HEAP_SIZE];
8787

8888
#if defined(CONFIG_USB_DEVICE_STACK_NEXT)
8989
extern int mp_usbd_init(void);

0 commit comments

Comments
 (0)