lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Sep 7, 2009 at 2:37 PM, Jim Pryor<> wrote:
> I should note I'm using a 64-bit Linux kernel. That may affect some of the sizes. (Perhaps that's why I'm seeing functions as 40 bytes overhead rather than 20 bytes.)
> Also I notice this comment in the discussion on that WoW wiki page, in case it helps:

Keep in mind that the specific measurements on the WoW wiki page have
to do with the implementation of Lua in World of Warcraft which is not
precisely stock Lua 5.1.  The relative measures should still be valid,

>> Description of upvalues is a bit flawed
>> Just a note, the way upvalue memory use is described is somewhat flawed, as
>> it's not separating the memory for the upvalue reference (4 bytes per closure)
>> from the memory for the value (28 bytes, IIRC). Lua doesn't care if the upvalue
>> changes or not (contrary to the wording here), the difference is that in the
>> 'constant' case there's only one VALUE and a reference in each closure, but in
>> the 'variable' example, there's a value for each instance, plus the 4 bytes on
>> each closure.

I just wanted to throw that out there, hopefully someone else is able
to come along and help answer the request of your questions =).

- Jim