This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 6/8] Types GC [the GC itself]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 09 Jun 2009 14:25:36 -0600
- Subject: Re: [patch 6/8] Types GC [the GC itself]
- References: <20090525080323.GF13323@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> run the mark-and-sweep garbage collector. Just without the next
Jan> patch 7/8 there will be crashes as not all the GDB reclaimable
Jan> types will be properly being marked.
This seems reasonable to me. I have a couple nits though.
Jan> +/* A traverse callback for type_group_link_table which removes any
Jan> + type_group_link whose reference count is now zero (unused link). */
Why bother with reference counts?
Jan> +void
Jan> +exp_types_mark_used (struct expression *exp)
Jan> +{
Jan> + exp_iterate (exp, exp_types_mark_used_iter, NULL, NULL);
Jan> +}
This is not called anywhere with this patch. I didn't check later
patches yet, so just ignore this if it is called later.
Tom