Amr Bekhit |
Hello,
I'm starting to hit the RAM limits on my eLua board (custom board running LPC1778), and so I've been looking into using the ROMFS to execute my compiled lua scripts directly from flash, rather than being loaded into RAM from an SD card. I've successfully compiled my .lc files into the eLua image and the program runs fine. However, I didn't notice my RAM usage decrease at all.
My program periodically prints the output of collectgarbage("count") and I didn't notice any significant difference between using the ROMFS and running off the SD card. I've got about 25kB worth of compiled lua scripts so I was expecting see a similar drop in RAM usage.
Can you execute compiled lua code directly from flash, or is it still loaded into RAM and executed there? I'm using eLua v0.8 Amr _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Amr Bekhit |
*bump* any thoughts on this? On 17 Sep 2013 12:29, "Amr Bekhit" <[hidden email]> wrote:
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi,
You won't get 25kB of RAM from running your precompiled script, that's not how it works, unfortunately. If you're seeing a drop in the RAM usage, it's all the current implementation can give you. Out of curiosity, what's the difference you're seeing? Best, Bogdan On Tue, Oct 1, 2013 at 10:44 AM, Amr Bekhit <[hidden email]> wrote: > *bump* any thoughts on this? > > On 17 Sep 2013 12:29, "Amr Bekhit" <[hidden email]> wrote: >> >> Hello, >> >> I'm starting to hit the RAM limits on my eLua board (custom board running >> LPC1778), and so I've been looking into using the ROMFS to execute my >> compiled lua scripts directly from flash, rather than being loaded into RAM >> from an SD card. I've successfully compiled my .lc files into the eLua image >> and the program runs fine. However, I didn't notice my RAM usage decrease at >> all. >> >> My program periodically prints the output of collectgarbage("count") and I >> didn't notice any significant difference between using the ROMFS and running >> off the SD card. I've got about 25kB worth of compiled lua scripts so I was >> expecting see a similar drop in RAM usage. >> >> Can you execute compiled lua code directly from flash, or is it still >> loaded into RAM and executed there? I'm using eLua v0.8 >> >> Amr > > > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Martin Guy |
In reply to this post by Amr Bekhit
On 01/10/2013, Amr Bekhit <[hidden email]> wrote:
> *bump* any thoughts on this? > On 17 Sep 2013 12:29, "Amr Bekhit" <[hidden email]> wrote: >> I'm starting to hit the RAM limits on my eLua board (custom board running >> LPC1778), and so I've been looking into using the ROMFS to execute my >> compiled lua scripts directly from flash. >> I was expecting see a similar drop in RAM usage. >> Can you execute compiled lua code directly from flash, or is it still >> loaded into RAM and executed there? I'm using eLua v0.8 Hi! Moving to eLua 0.9 should help, as it has more RAM optimizations, including being able to read bytecode directly from Flash memory. On the Mizar32 branch there is a series of hacks to reduce code size, but the only RAM advantages to be had by reconfiguring are not to use the buffers on the serial port/console and the ADCs - there is precious little else to be had in terms of RAM usage in that direction. Cheers, let us know if 0.9's bytecode-from-flash work makes any difference M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |