Allthough there should be enough RAM(?) I'm getting this error.
Code: Select all
from writer import Writer
import courier20
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 4033 bytes
Code: Select all
import gc
gc.mem_free()
15232
import micropython
micropython.mem_info(1)
stack: 2128 out of 8192
GC: total: 35968, used: 21200, free: 14768
No. of 1-blocks: 122, 2-blocks: 43, max blk sz: 264, max free sz: 135
GC memory layout; from 3ffef550:
00000: MDShhSMMDDhThDMB=BBBh===h====hDBhh==h===========================
00400: ================================================================
00800: ================================================================
00c00: ================================================================
01000: ============================================hhBhDhBh=h===BDh==hB
01400: hDhDBMDDBBBBhB=h=h===B=MDhh=======h=============================
01800: ================================================================
01c00: ================================================================
02000: ====================================================BBB=hBMShSh=
02400: h========B=BSh=Dh=hSMDhh=DDhhSh======hhB=BBTh===h==BDhB=B==BhBhB
02800: =B=BBB=BhB=BBh===h=BBBh=======h========h=..h=h=h=M.Dh====h=B=B=B
02c00: h===h==Sh==h========hh.B=h=======hh===B=.B=h==B=h===h=Bh=h...SSh
03000: =h==hh=h====h=====h=.Sh=....Sh=======================h=======h==
03400: ===========h=h======h====...........h=..........................
03800: .....................................................Sh==.......
03c00: ....h===..................................hh.........h=.........
04000: .......h=======.................................................
04400: ................................................................
04800: ................h=======........................................
04c00: ................................................................
05000: ...............................h=======.........................
05400: ...................................h============================
05800: ================================================================
05c00: ================================================================
06000: ================================================================
06400: ================================...............h============....
(2 lines all free)
07000: .h=...h=........................................................
07400: ...........hh..................h=...hh........hh................
07800: ................................................................
07c00: .h===.....................h==h===========h==================h===
08000: =========h====h=====h==========h==h===hh====================hh==
08400: ========hh==hh=hh====hh====h=h=====hh=====================h.....
08800: ................................................................
08c00: ........
Another example:
Code: Select all
import courier20
from writer import Writer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 80 bytes
Any clues?
Tom