Skip to content

Commit c6b8750

Browse files
committed
esp8266: Use dedicated heap allocated as static array.
We cannot assume that all memory belongs to us - it actually belongs to ESP8266 OS.
1 parent d2d64f0 commit c6b8750

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

esp8266/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
#include "gccollect.h"
3939
#include MICROPY_HAL_H
4040

41+
STATIC char heap[16384];
42+
4143
void user_init(void) {
4244
soft_reset:
4345
mp_stack_set_limit(10240);
4446
mp_hal_init();
45-
gc_init(&_heap_start, &_heap_end);
47+
gc_init(heap, heap + sizeof(heap));
4648
gc_collect_init();
4749
mp_init();
4850
mp_obj_list_init(mp_sys_path, 0);

0 commit comments

Comments
 (0)