mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 17:40:24 +08:00
c141584e1e
Should keep good chunk of heap unfragmented, if a user application allows that at all.
14 lines
231 B
Python
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()
|