RFA: Add range checking to initialisation of special entries in ggc-page's size_lookup table
Ian Lance Taylor
iant@google.com
Mon Jul 24 18:26:00 GMT 2006
Nick Clifton <nickc@redhat.com> writes:
> gcc/ChangeLog
> 2006-07-24 Nick Clifton <nickc@redhat.com>
>
> * ggc-page.c (NUM_SIZE_LOOKUP): New constant - the length of the
> size_lookup[] array.
> (ggc_alloc_stat): Use NUM_SIZE_LOOKUP.
> (ggc_pch_count_object): Likewise.
> (ggc_pch_alloc_object): Likewise.
> (ggc_pch_write_object): Likewise.
> (init_ggc): Do not attempt to initialize entries in the
> size_lookup[] array for objects whose size is greater than than
> the length of the array.
This is OK with the change from "break" to "continue" that Richard
pointed out. Assuming it has been bootstrapped and tested, of
course--you didn't mention.
Thanks.
Ian
More information about the Gcc-patches
mailing list