Search found 906 matches

by kevinkk525
Sun Sep 23, 2018 4:59 pm
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

oh I did not see that file the first time. The file is 2MB big, has a lot in it. QSTRs of all my modules and strings, a lot of (const bytes*), a lot of these: // frozen bytecode for file _testing/utils/subscribe_file.py, scope _testing_utils_subscribe_file__lt_module_gt__printMemory STATIC const byt...
by kevinkk525
Sun Sep 23, 2018 4:51 pm
Forum: General Discussion and Questions
Topic: [SOLVED] Unloading modules frees RAM only when unloading root package
Replies: 15
Views: 3654

Re: [BUG?] Unloading modules frees RAM only when unloading root package

Allright, here's a MCVE: I'm using the function you suggested in the module pysmartnode.utils.subscriptionHandlers.test: def b(): b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b();b(); return 0 All ...
by kevinkk525
Sun Sep 23, 2018 3:58 pm
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

As far as I can tell, no .c file holds my code. All files are inside ports/esp8266/build/frozen_mpy/ as .mpy
Apart from that there is code in ports/esp8266/build/build/frozen_mpy.o
There is nothing in ports/esp8266/build/build/frozen.o

I just followed the official instructions for freezing modules.
by kevinkk525
Sun Sep 23, 2018 3:11 pm
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

what result?
I put all my modules into ports/esp8266/modules folder and build the firmware..
by kevinkk525
Sun Sep 23, 2018 2:16 pm
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

Guess I don't know what you mean by FROZEN_STR.
My modules are frozen bytecode as part of the firmware. The strings of the configuartion are in these files and are not getting modified in any way and therefore stay in flash.
by kevinkk525
Sun Sep 23, 2018 8:23 am
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

My problem is, that I have many mutable objects like classes and class instances, which can not be changed to be immutable. Therefore I tried loading some of these only when needed and then unload them. After importing the neccessary modules like uasyncio, mqtt_as, an mqtt_handler written by myself ...
by kevinkk525
Sun Sep 23, 2018 7:38 am
Forum: General Discussion and Questions
Topic: [SOLVED] micropython.native in frozen bytecode
Replies: 8
Views: 2162

Re: micropython.native in frozen bytecode

ok so if I use frozen modules, I can't benefit from the native emitter because only the internal compiler of micropython can do that?
by kevinkk525
Sun Sep 23, 2018 6:46 am
Forum: General Discussion and Questions
Topic: Remove imported module from RAM
Replies: 62
Views: 23303

Re: Remove imported module from RAM

All my modules are frozen bytecode otherwise I would have run out of RAM a long time ago. Functions, classes and objects still take RAM, strings not as they are loaded from flash (as long as I don't modify them).
by kevinkk525
Sat Sep 22, 2018 8:31 am
Forum: General Discussion and Questions
Topic: [SOLVED] micropython.native in frozen bytecode
Replies: 8
Views: 2162

[SOLVED] micropython.native in frozen bytecode

Is it possible to use the micropython.native emitter in frozen bytecode?

I tried to use it but when compiling the esp8266 firmware I get an error that the emitter is not supported.
by kevinkk525
Sat Sep 22, 2018 7:31 am
Forum: General Discussion and Questions
Topic: [SOLVED] Unloading modules frees RAM only when unloading root package
Replies: 15
Views: 3654

Re: [BUG?] Unloading modules frees RAM only when unloading root package

You are right, should have added the sys.modules output. pysmartnode.networking.mqtt_receive_config imports only uasyncio, time, json. uasyncio stays in sys.modules after unloading. All modules are frozen bytecode. Still unloading a module imported like "from some import module" does not release the...