Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit 686367d

Browse files
committed
esp8266: Explicitly collect garbage in bootstrap scripts.
Leads to less fragmentation at teh time user code starts.
1 parent 417dc0c commit 686367d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

esp8266/modules/_boot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import gc
12
import uos
23
from flashbdev import bdev
34

@@ -7,3 +8,5 @@
78
except OSError:
89
import inisetup
910
vfs = inisetup.setup()
11+
12+
gc.collect()

esp8266/scripts/inisetup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def setup():
4040
with open("/boot.py", "w") as f:
4141
f.write("""\
4242
# This file is executed on every boot (including wake-boot from deepsleep)
43+
import gc
4344
#import webrepl
4445
#webrepl.start()
46+
gc.collect()
4547
""")
4648
return vfs

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy