This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [commited] Reduce memory overhead of PRE bitmaps
Hi,
On Tue, 7 Sep 2004, Devang Patel wrote:
> > Hi,
> > the attached patch move bitmaps used by PRE to obstacks to conserve
> > roughly 10% of GGC allocated memory. I've bootstrapped and regtested it
> > on i686-pc-gnu-linux and will commit it shortly. It has been approved
> > by Daniel on IRC.
>
> I thought GCC is moving away from obstacks ?
For stuff with complicated lifetime. But for things which come in big
number and are small itself, and have a very constrained lifetime
(especially the end of life has to be a defined point, like for instance
the end of a certain optimization pass), obstacks (or allocpool) are just
perfect.
> Side note: All these memory managers makes me dizzy sometimes :). It'd
> be helpful if there is one document describing which one to use in which
> situations.
complicated lifetime -> ggc
defined end-of-life, many small -> obstacks/allocpool
defined end-of-life, few big -> malloc/free
It's complicated by the fact, that ggc stuff can't easily stay just inside
non-ggc stuff (you have to register some roots).
Ciao,
Michael.