-->
Page 1 of 1

Program sizes

PostPosted: Tue Dec 20, 2016 4:34 pm
by cwr
I've been trying to find out how much space my Lua program is using,
and finding it very difficult. luac compiles it to a file of 18755
bytes; decompiling produces lines of the form:
main <therm.lua:0,0> (78 instructions, 312 bytes at 0x8065d10)
and these byte values sum to 4736. On the other hand, the hexadecimal
values in these lines range from 0x8065d10 to 0x8071ca8, a range of
49048 bytes. One of these three measures is correct, but which?

If I add even a small function to the program I get a refusal to load
and E:M error message with a fairly obscure error code. That makes me
think I'm pretty near the limits of memory, but does anyone know what
those limits actually are?

Thanks - Will

Re: Program sizes

PostPosted: Sat Dec 24, 2016 3:49 am
by TerryE
What build version are you using? You didn't answer the Q. You've got to use a current master. Also use luac.cross not luac for examining code, and read my FAQ.

Re: Program sizes

PostPosted: Fri Dec 30, 2016 8:07 am
by cwr
I'm using the current master from GitHub, and compiling it locally with gcc. However, I'm not trying to find the numbers for a specific install, which will vary with the specific modules included in the build, but how to find the numbers generally. The ESP8266 / NodeMCU memory layout is pretty obscure.

Will