[Gc] How to Verify the behavior of GC?
ogoh at asu.edu
Wed Jan 7 12:47:00 PST 2004
I modified libgc to support an incremental GC by applying write barriers
on instructions of mutators when they change memory references. Since there
are some changes to support incremental GC and new OS, I'd like to check
whether modified GC works correctly or not.
So, I wonder whether there are methods to verify the behavior of GC in the
aspect of correctness. So far, I just did some stress tests with sample
applications to check whether the applications give a correct output while
invoking a lot GC.
Checking the size of GC_mem_found might be one way. But, as gc6.1 is
conservative GC which has a possibility of false references, I think it may
not give some constant or predictable values.
Another problem I encounter after modification, there are some objects on
free-lists which are accidentally marked. I need to figure out why this
happens after incremental marking. At the original code,
GC_clear_fl_marks() to clear this mark decrements GC_mem_found. But I don't
know why GC_mem_found must be decremented. This is just data for statistics
but just I'm curious.
I appreciate any advice for these.
More information about the Gc