As the title says... Chat on...

User avatar
By cwr
#59760 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
User avatar
By TerryE
#59912 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.
User avatar
By cwr
#60145 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