This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question about GTY macro
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 8 May 2014 09:38:35 +0200
- Subject: Re: question about GTY macro
- Authentication-results: sourceware.org; auth=none
- References: <201405080521 dot s485LuBQ019351 at greed dot delorie dot com>
On Thu, May 8, 2014 at 7:21 AM, DJ Delorie <dj@redhat.com> wrote:
>
> Given this in tree.h:
>
> struct int_n_trees_t {
> tree signed_type;
> tree unsigned_type;
> };
Mark with GTY(())
> extern struct int_n_trees_t int_n_trees[NUM_INT_N_ENTS];
Likewise. See how global_trees is marked for example. But likely
you forgot to mark struct int_n_trees_t to be considered for GC.
Richard.
> And this in tree.c:
>
> struct int_n_trees_t int_n_trees [NUM_INT_N_ENTS];
>
> What is the right way to mark these for garbage collection?
>
> I can't seem to get int_n_trees[] to show up in any of the gc-related
> generated files.
>
> I need the int_n_trees[] trees to be locked into memory, but I see
> signs that they're being reclaimed instead.