esp8266/_boot.py: Decrease GC alloc threshold to quarter of heap size.

The idea behind decrease is: bytecode and other static data is also kept on
heap, and can easily become half of heap, then setting threshold to half of
heap will have null effect - GC will happen on complete heap exhaustion like
before. But exactly in such config maintaining heap defragmented is very
important, so lower threshold to accommodate that.
This commit is contained in:
Paul Sokolovsky 2016-07-23 13:56:24 +03:00
parent 2dd21d9a68
commit 0d221775f5
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import gc
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 2)
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4)
import uos
from flashbdev import bdev