This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC]: New zone based garbage collector and thoughts on incrementalcollection
On Fri, 5 Sep 2003, Zack Weinberg wrote:
> Daniel Berlin <dberlin@dberlin.org> writes:
>
> >> > When I was thinking about this in the spring, I convinced myself
> >> > that knowing the type at ggc_alloc time was never necessary.
> >>
> >> For generations, sure, for incremental, you do need to know it, because
> >> you need to restart marking at any point.
> >
> > We also need to know it to be able to mark a single zone at a time,
> > because we don't know which roots point to things in which zones (we only
> > know which roots *start* in which zones, which isn't helpful at all).
>
> And furthermore, always having a type code around allows *drastic*
> simplification of the heap walker routines.
I've got type codes going now, and a marker array.
The problem is the uses in htabs and whatnot may require a wrapper
function for their allocator, rather than passing in regular ggc_alloc
(since we need to pass in the right type code).
Is this acceptable?
>
> zw
>