Hi,
I want to know where the .lua modules in the romfs reside. Are they loaded to RAM at startup of my program? I did some memory measurements(using mallinfo and collectgarbage) and I use respectively around 52Kb and 28KB. Are the used modules included in the lua ram or in the overall memory usage? thanks for your help ;-) |
Hi,
On Thu, Aug 2, 2012 at 11:53 AM, agostain <[hidden email]> wrote: > Hi, > > I want to know where the .lua modules in the romfs reside. Are they loaded > to RAM at startup of my program? If they are Lua code, then yes, they are loaded to RAM (but not completely, rather into a small buffer) and then compiled to bytecode (which will also stay in RAM), then executed. If they are bytecode (a result of cross-compiling), the latest eLua memory optimizations will read the bytecode directly from Flash, without using any RAM. > > I did some memory measurements(using mallinfo and collectgarbage) and I use > respectively around 52Kb and 28KB. Are the used modules included in the lua > ram or in the overall memory usage? Both. Lua uses malloc to alloc memory. 52 vs 28 seems quite a bit of a difference though. I never played with mallinfo, I'm wondering how accurate this particular implementation is. Best, Bogdan > > thanks for your help ;-) > > > > -- > View this message in context: http://elua-development.2368040.n2.nabble.com/lua-modules-in-memory-tp7577645.html > Sent from the eLua Development mailing list archive at Nabble.com. > _______________________________________________ > 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 |
This post was updated on .
|
HI,
On Fri, Aug 3, 2012 at 9:58 AM, agostain <[hidden email]> wrote: > > BogdanM wrote >> >> Hi, >> >> On Thu, Aug 2, 2012 at 11:53 AM, agostain <agostino.difiglia@> >> wrote: >>> Hi, >>> >>> I want to know where the .lua modules in the romfs reside. Are they >>> loaded >>> to RAM at startup of my program? >> >> If they are Lua code, then yes, they are loaded to RAM (but not >> completely, rather into a small buffer) and then compiled to bytecode >> (which will also stay in RAM), then executed. If they are bytecode (a >> result of cross-compiling), the latest eLua memory optimizations will >> read the bytecode directly from Flash, without using any RAM. >> >> *does it apply also for elua-0.8 or the bleeding edge version? I >> cross-compile the lua code. Bleeding edge only. >> >> Flash? I don't think the LPC1769 has flash enabled in elua. I mean the internal MCU flash. If you have ROMFS enabled, you are already using the internal flash. >> >> So if I get it right all my cross-compiled lua modules that will be used >> by my application will reside in the RAM? * No. If they are cross-compiled in flash, the bytecode will be read directly from flash. Your program data will still be in RAM, obviously. Best, Bogdan >> >>> >>> I did some memory measurements(using mallinfo and collectgarbage) and I >>> use >>> respectively around 52Kb and 28KB. Are the used modules included in the >>> lua >>> ram or in the overall memory usage? >> >> Both. Lua uses malloc to alloc memory. 52 vs 28 seems quite a bit of a >> difference though. I never played with mallinfo, I'm wondering how >> accurate this particular implementation is. >> >> Best, >> Bogdan >> >>> >>> thanks for your help ;-) >>> >>> >>> >>> -- >>> View this message in context: >>> http://elua-development.2368040.n2.nabble.com/lua-modules-in-memory-tp7577645.html >>> Sent from the eLua Development mailing list archive at Nabble.com. >>> _______________________________________________ >>> eLua-dev mailing list >>> eLua-dev@.berlios >>> https://lists.berlios.de/mailman/listinfo/elua-dev >> _______________________________________________ >> eLua-dev mailing list >> eLua-dev@.berlios >> https://lists.berlios.de/mailman/listinfo/elua-dev >> > > > > > -- > View this message in context: http://elua-development.2368040.n2.nabble.com/lua-modules-in-memory-tp7577645p7577647.html > Sent from the eLua Development mailing list archive at Nabble.com. > _______________________________________________ > 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 |
Free forum by Nabble | Edit this page |