lua-users home
lua-l archive

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


On Saturday 14, Roberto Ierusalimschy wrote:
> > I will update the Emergency GC patch to include these changes, even
> > though it doesn't happen on this test case.
>
> Lua 5.2 has a compile option for debugging that forces an emergency GC at
> every single memory allocation. It takes hours to run the tests,
> but it found several bugs that I do not think we could find otherwise.

Yup, I do basically the same thing when stress testing the EGC patch, I always 
remove that testing code before releasing a new patch since I was trying to 
keep the patch small (to late for that now).  The next release will include a 
compile option to turn on the stress testing code.

Are you doing a full/step GC on each allocation?  Also is the GC only called 
during allocations where newsize > oldsize or on every call to 'l_alloc()'?

When I do stress testing a full GC is only done when newsize > oldsize.  Frees 
and array shrinks don't cause the GC to be called.  Also I run all the test 
scripts under valgrind's memory checker tool to find all the bugs that don't 
cause a crash.

-- 
Robert G. Jakabosky