From c141584e1e30b6dd2268d8831b706dcb9ab25c7c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 23 Jul 2016 00:20:49 +0300 Subject: [PATCH] esp8266/_boot.py: Set GC alloc threshold to half of heap size. Should keep good chunk of heap unfragmented, if a user application allows that at all. --- esp8266/modules/_boot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py index 2cacb56760..ed43c0b3df 100644 --- a/esp8266/modules/_boot.py +++ b/esp8266/modules/_boot.py @@ -1,4 +1,5 @@ import gc +gc.threshold((gc.mem_free() + gc.mem_alloc()) // 2) import uos from flashbdev import bdev