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: GC special object sizes


Steven Bosscher <s.bosscher@student.tudelft.nl> writes:

> If there was an elegant check to see if an extra_order_size was a power
> of two, I would implement it so that we'd ignore extra page orders for
> such sizes in init_ggc in ggc-page.  (This would also allow us to have
> fire-and-forget page orders for things like identifier nodes which have
> different sizes for each language.) 
> But so far I couldn't come up with something (haven't tried anything)...

init_ggc has to merge the table of extra order sizes into the
size_lookup array anyway -- it can do a probe for a collision at that
point.  You care about collisions within the extra_order_size_table as
well as with the power-of-two buckets.

As long as you're hacking the GC, you could implement something I've
been meaning to do for at least two years, which is allocate
everything bigger than half a page on a special "large object" chain
so that we do not waste ridiculous amounts of memory on them.  We very
rarely need such objects, so they can go through a slow path.

zw


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