lua-users home
lua-l archive

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

On Sun, Jul 28, 2013 at 8:16 PM, Mark Hamburg <> wrote:

Where this comes back to bite one is in cases where very large structures — e.g., huge tables or large bitmaps hanging off of a small userdata — become inaccessible.

This is the classic problem where you have Lua GC and some other runtime GC interacting.  It's an issue with Lua with Android, with these little userdatas keeping large Java objects locked.  Obviously Lua cannot look inside!  Although even with pure Java Android, one tends to release things like bitmaps explicitly.

Another strategy that can really help is escape analysis - checking that a local has no further references at function exit. LuaJIT does this well, if some care is taken.