micropython/esp8266/modules/_boot.py
Paul Sokolovsky c141584e1e 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.
2016-07-23 00:20:49 +03:00

14 lines
231 B
Python

import gc
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 2)
import uos
from flashbdev import bdev
try:
if bdev:
vfs = uos.VfsFat(bdev, "")
except OSError:
import inisetup
vfs = inisetup.setup()
gc.collect()