diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-23 13:56:24 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-23 13:56:24 +0300 |
commit | 0d221775f5ab458358ee873b70ad16f284a9b1cb (patch) | |
tree | 7dfa75baaa445fd781a3026d1cd94213b9c70d8d /esp8266 | |
parent | 2dd21d9a68ef90bd42fa355a744dde89031611c1 (diff) | |
download | micropython-0d221775f5ab458358ee873b70ad16f284a9b1cb.tar.gz micropython-0d221775f5ab458358ee873b70ad16f284a9b1cb.zip |
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.
Diffstat (limited to 'esp8266')
-rw-r--r-- | esp8266/modules/_boot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py index ed43c0b3df..c200b3d3f9 100644 --- a/esp8266/modules/_boot.py +++ b/esp8266/modules/_boot.py @@ -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 |