This is the mail archive of the gcc@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: Varray memory consumption strikes back


> > 
> > If you don't like varrays in the normal memory, would turning the
> > stack-like datastructures above to obstacks (or newly invented
> > friendlier stack datastructure perhaps with fixed object size)
> > and array-like datastructures to simple C arrays (where we would lose
> > bounds checking) or newly invented bound checked arrays without growing
> > facility make any sense to you?
> Again, the fundamental problem is definable lifetime and the fact
> that most objects in GCC do not have a definable lifetime.  Hell,
> one could even make the claim that no objects in GCC have a
> definable lifetime because of the rats nest of pointers we have.

According to my statistics, this is not true at all.  The object with
undefined lifetimes (ie tree/RTL) are together are just minor portion of
GGC pool consumption.  Yet most of these never survive ggc_collect and
are thus local to single BB.

I used to have patch that tracks age of object (ie how many collections
it survives) and it shows pretty clearly what allocations seems to be
local to block.  I can rescuesce it if it looks interesting.

Honza
> 
> jeff
> 


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