lua-users home
lua-l archive

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

On Tue, Nov 18, 2008 at 02:27, Alex Sandro Queiroz e Silva <> wrote:

Florian Weimer wrote:
> Can the C memory region associated with a userdata object change its
> address during the lifetime of the object?

    No, Lua uses a precise non-moving incremental mark-and-sweep
collector. It does not move memory around, which would be a bad thing
for a language designed to be embedded in C.
But good for cpu which have many levels of cache system.
Copy many blocks of data in memory will refresh  cache in each core of cpus.
Copy is bad for cache.This is why java is slow. 


Linker Lin