lua-users home
lua-l archive

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


Maybe there is a misunderstanding of how the GC works. What moves the GC
is not the amount of memory being used, but the amount of memory being
allocated. If you are using 100GB, frees them all, and do not allocate
anything else, the GC will not collect anything.

So, keeping some huge userdata is not particularly relevant to the
GC. What is relevant is the allocation of a huge userdata. You can
communicate this to the GC by calling collectgarbage("step", x) with 'x'
proportional to the size of the userdata.

-- Roberto