summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-15 00:21:57 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-15 00:36:03 +0200
commitc6b8750c143b21e797ace233a92e476f8ce798e0 (patch)
treef9fa1a551ecd4a59d1d7def00420537527f38d8a
parentd2d64f00fb7f1487c1fa21a456e003a801d7e711 (diff)
downloadmicropython-c6b8750c143b21e797ace233a92e476f8ce798e0.tar.gz
micropython-c6b8750c143b21e797ace233a92e476f8ce798e0.zip
esp8266: Use dedicated heap allocated as static array.
We cannot assume that all memory belongs to us - it actually belongs to ESP8266 OS.
-rw-r--r--esp8266/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index da2f852ebe..68d015a26c 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -38,11 +38,13 @@
#include "gccollect.h"
#include MICROPY_HAL_H
+STATIC char heap[16384];
+
void user_init(void) {
soft_reset:
mp_stack_set_limit(10240);
mp_hal_init();
- gc_init(&_heap_start, &_heap_end);
+ gc_init(heap, heap + sizeof(heap));
gc_collect_init();
mp_init();
mp_obj_list_init(mp_sys_path, 0);