On Fri, Aug 21, 2009 at 5:37 AM, Steven Bosscher<stevenb....@gmail.com> wrote: > On Fri, Aug 21, 2009 at 10:52 AM, Laurynas > Biveinis<laurynas.bivei...@gmail.com> wrote: >>>> BTW, it does not deal with types that in some instances have variables >>>> allocated in proper GC way (with a path from GC root) and in some >>>> instances not. Fixing these is going to be hard. >>> >>> Do you have some examples? >> >> Trees and rtxes mostly. > > Not to discourage you, but, eh... -- wouldn't it be a much more useful > project to move RTL out of GC space completely instead of improving GC > for rtxes? The life time of RTL is pretty well defined by now and > much of the unwieldly GC / GTY (and, in fact PCH) code would go away > if RTL would just live on obstacks again. >
One problem with obstacks was that it didn't allow freeing of stuff in the middle, so the high watermark for passes could be quite high unless you used many obstacks. It would be trivial to make an arena-style allocator that took care of this problem, however.