This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Extreme PRE compile times
>
> > > This all is probably not too hard to implement for the page allocator
> > > (dunno about ggc-simple/ggc-zone, or what would happen on out-of-memory,
> > > or...). The thing is, right now it would have to be implemented for
> > > _three_ different collectors :-(
> >
> > The zone collector can do this trivially. Just create a new zone at the
> > beginning of the pass, and free it at the end!
>
> What happens if some objects in the zone are still live? Copying?
You said the pass would be responsible for making sure nothing points to
freed objects.
I assumed you meant that all objects in the pool would be freed at the end
of the pass. If you want to still have live objects in it, then we just
wouldn't destroy the zone at the end, and everything would be happy.
Allocated and freed pages belong to specific zones, rather to the
global structure.
Thus, destroying a zone frees the system allocator to do whatever the heck
it wants to with those pages that used to be controlled by the zone.
Of course, it also means those free pages won't be used by another zone
(i've considered changing this, it's not hard) until released.
Also note that because we haven't changed how marking works in the zone
allocator marking any zones marks all zones.