This is the mail archive of the gcc-patches@gcc.gnu.org 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: Explicitly release memory used by varrays


On Mon, Sep 13, 2004 at 02:07:52PM -0600, Jeffrey A Law wrote:
> Well, given that all of the block local varrays are just varrays of
> trees, you could easily build a manager which kept of free
> list of varray trees for reuse.  You would (of course) release all
> of them when DOM completes.
> 
> I doubt it's worth the effort to do anything like sort them into
> buckets based on their size.  ie, a simple cache of reusable
> varrays trees ought to be enough to avoid creating tons of
> garbage.
> 
> The existing scheme was implemented the way it is precisely to
> avoid creating tons and tons and tons of block local varrays
> for 8361 and a variety of other tests.

How big do these varrays tend to be?  I have a lot of trouble believing
that what you describe above is substantially faster than
ggc_alloc/ggc_free.  Admittedly the zone collector that I'm working on
has somewhat faster alloc and free than the page collector.

-- 
Daniel Jacobowitz


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