This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix zone garbage collector to support PCH

On Mar 3, 2004, at 11:00 PM, Ian Lance Taylor wrote:

While looking into PCH issues, I was baffled for a while by failures
in the zone garbage collector.  However, they turned out to have
nothing to do with my patches.  The zone garbage collector doesn't
currently work correctly with PCH.

Yes, i know, unfortunately.
It's an alignment problem i just haven't gotten around to fixing (it's somewhere on my todo list).

It took me *forever* to track it down.

The page alignment in ggc_pch_write_object() appears to be copied from a similar construct in ggc-page.c. However, in ggc-page.c, ggc_pch_total_size() also aligns the total.

I don't know why ggc-page.c bothers to page align the file pointer.
The file is just being used for fread() and fwrite() of sizes which
appear to normally be less than a page.  I can't see why aligning the
file pointer provides any benefit, and it obviously makes the
resulting PCH file a bit larger.  However, I didn't try to change

I just removed the alignment of the file pointer in
ggc_pch_write_object() in ggc-zone.c.  This fixes it so that all the
PCH tests pass when using the zone garbage collector.

OK to check in?

Sure. Thanks a bunch. Now i can remove it from my todo list. :)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]