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 <asandroq@gmail.com> wrote:
Hallo,

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. 


Cheers,
-alex
http://www.ventonegro.org/



--
Regards,
Linker Lin
linker.m.lin@gmail.com