summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-23 00:20:49 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-23 00:20:49 +0300
commitc141584e1e30b6dd2268d8831b706dcb9ab25c7c (patch)
treef82239e7f5bd71af81084dc8ad2108b0955dde87 /esp8266
parent77f0cd8027e0b460bc1cf0b78b40cf5fcbd75477 (diff)
downloadmicropython-c141584e1e30b6dd2268d8831b706dcb9ab25c7c.tar.gz
micropython-c141584e1e30b6dd2268d8831b706dcb9ab25c7c.zip
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.
Diffstat (limited to 'esp8266')
-rw-r--r--esp8266/modules/_boot.py1
1 files changed, 1 insertions, 0 deletions
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