This is the mail archive of the
mailing list for the GCC project.
Re: Fix zone garbage collector to support PCH
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Ian Lance Taylor <ian at wasabisystems dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 3 Mar 2004 23:14:23 -0500
- Subject: Re: Fix zone garbage collector to support PCH
- References: <firstname.lastname@example.org>
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?
Thanks a bunch.
Now i can remove it from my todo list.