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]

Copying collection and our ggc_collect practices


Currently, gcc has a bad habit of keeping ggc_alloc'd pointers in unmarked
local variables, and expecting the addresses not to change over a
ggc_collect.

This of course, prevents us from doing copying collection.

I've been experimenting with having a fixed size copy collected nursery in
the zone allocator, with things being promoted into the mark/sweep zones.

This lets us save a ton of marking time, which is the main gc time
expense, plus it greatly reduces memory fragmentation (since their's no
fragmentation in the nursery).

However, in order to do this, we need to either mark these locals that
store ggc_alloc'd pointers (which will cause them to be forwarded to the
new pointers properly), or stop expecting them to be valid over collections.

This is a problem, since the expectation of validity is rampant, and
there's no current way to GTY local variables.

Ideas?



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