lua-users home
lua-l archive

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

Ariel Manzur wrote:
out of curiosity, how much memory are you using for all these objects?
(lua + the c++ side allocations)
how much of the world could you fit in, say, 256k?

The objects are either very small objects that are allocated all in lua (like a vector with 3 floats) or bigger objects where lua just keeps a pointer to the object. The bigger objects all have their lifetime controlled by C (the pointer in lua is just a weak reference) so it is only the space occupied by the pointers that is affected by GC performance.

So 4 -- 30 bytes per object.

// Niklas