Garbage Collector interface - GTY
Daniel Berlin
dberlin@dberlin.org
Sun Feb 23 03:00:00 GMT 2003
On Saturday, February 22, 2003, at 08:33 PM, Geoff Keating wrote:
>> Date: Sat, 22 Feb 2003 21:29:54 +0100
>> From: Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>
>
>> So its better to split the array of structures to 2 arrays, right?
>> GTY machinery would be used for one of them (the main one),
>> the second (auxiliary) one will not be marked.
>
> I doubt it. Why can't the whole array be in GCed memory?
>
It is, actually, and i'm confused what Josef thinks is wrong.
Josef, it does generate *markers* for the struct definition, they just
are never *used* anywhere.
It uses the right markers for the table:
static void gt_ggc_ma_decl_loc_table PARAMS ((void *));
static void
gt_ggc_ma_decl_loc_table (x_p)
void *x_p ATTRIBUTE_UNUSED;
{
if (decl_loc_table != NULL) {
size_t i0;
ggc_mark (decl_loc_table);
for (i0 = 0; i0 < (size_t)(decl_loc_table_allocated); i0++) {
gt_ggc_m_12var_loc_node (decl_loc_table[i0].first);
gt_ggc_m_12var_loc_node (decl_loc_table[i0].last);
}
}
}
> --
> - Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list