lua-users home
lua-l archive

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


Another option is to use a GC metamethod. Everytime the memory use
crosses a threshold Lua runs the garbage collector, which calls the __gc
metamethods for collectable userdata. This is a perfect time to check
for memory overflow.

-- Roberto