This is the mail archive of the 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: C++ PATCH: Do not allocate conversions in GC-memory

memory in conversion_obstack gets zeroed (or something) in each place
where it's freed? Otherwise there's no check that a pointer does not

There are checks that all of the memory in the obstack is freed.

I could add zeroing, but there's no need for that. It's evident from construction that none of the memory can escape.

How does this reduce the number of calls to ggc_set_mark?

Because there is less GCable memory, fewer collections, and fewer ways of reaching the same GCable objects.

 Is it
possible that you're now storing pointers to GCed memory in non-GCed
memory, or is this entirely due to fewer ggc_collect runs?

We're definitely storing some memory to GCed memory in non-GCed memory.

That's a good thing; it's no different than storing a pointer to GCed memory on the stack. This memory is transient, and there can be no calls to the collector while these routines are active unless a new context is pushed. The only GC-able memory pointed to from these data structures is memory that was extant before the data structures were active.

Similarly, no PCH file can be created while these routines are active.

Did you run a bootstrap with gcac checking?


Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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