lua-users home
lua-l archive

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


Le 30 oct. 2013 à 12:25, Roberto Ierusalimschy <roberto@inf.puc-rio.br> a écrit :

>> BTW I did more tests about garbage collection with one of my small
>> test app on an iOS device to check the behavior of a same test pattern
>> with different values of stepmul.
> 
> IIRC, your program has this characteristics of spending a good part of
> its memory on userdata that is external to Lua. Is that true about
> this test app, too?

Yes, most of the allocated memory is external to Lua. Lua has references to this external memory through userdata objects, each containing only a pointer to a corresponding external object.
Lua calls to the userdata finalizers are the trigger to release the memory used by external objects.

Please note that the memory size values given in my previous message are the total memory occupation at the application level (i.e. Lua memory + external objects).

Jean-Luc