[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ever-Increasing Memory Usage in 5.0
- From: Mark Hamburg <mhamburg@...>
- Date: Tue, 11 Apr 2006 08:59:49 -0800
If you've got significant data accessed from Lua via stub userdata objects
-- i.e., objects just containing pointers to the real data -- it is
definitely a good idea to give the GC a little more help. In our case, it's
huge bitmaps that create the issue.
Under Lua 5.1 our solution is to run the GC forward a bit as we allocate
these. How much to run it forward was determined essentially empirically
(haphazardly?) to balance between memory consumption and GC time.
Under Lua 5.0, we built up a count of the number of bytes allocated and
forced a full GC when that number crossed a threshold.
Mark