This is the mail archive of the
mailing list for the GCC project.
Re: Summary of patches
- From: law at redhat dot com
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Zack Weinberg <zack at codesourcery dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 02 Mar 2004 11:31:47 -0700
- Subject: Re: Summary of patches
- Reply-to: law at redhat dot com
In message <20040302180846.GA21903@redhat.com>, Richard Henderson writes:
>On Tue, Mar 02, 2004 at 03:16:54PM +0100, Jan Hubicka wrote:
>> > marked and swept without ever using ggc_alloc (which is not suited to
>> > resizable data structures) for them.
>> I will try to think about this deeper, but it seems to be that we will
>> just end up with two ggc allocators hooked together. With Richard's
>> ggc_free patch we can now release the memory explicitely, so I am not
>> quite sure what is the most sane approach here.
>I think with ggc_free, ggc_alloc is no worse than malloc here.
Well, the implementation of ggc_free had some issues -- namely that the
code to deal with freeing an object on an otherwise full page could
dominate compile-time if extreme cases. I've fixed that :-)
The one area where it looks like it could be improved would be to _not_
ggc_free if the reallocation can be satisfied by simply extending the
existing allocation because it did not fill the allocation size for its
page. This happens regularly with varrays.