2011/9/17 Dodji Seketeli <do...@redhat.com>: > OK, so the patch below extracts a public ggc_alloced_size_for_request > function from the different implementations of the ggc allocator's > interface, and lets new_linemap use that. > libcpp/ > > * include/line-map.h (struct line_maps::alloced_size_for_request): > New member. > * line-map.c (new_linemap): Use set->alloced_size_for_request to > get the actual allocated size of line maps. > > gcc/ > > * ggc.h (ggc_alloced_size_for_request): Declare new public entry > point. > * ggc-none.c (ggc_alloced_size_for_request): New public stub > function. > * ggc-page.c (ggc_alloced_size_order_for_request): New static > function. Factorized from ggc_internal_alloc_stat. > (ggc_alloced_size_for_request): New public function. Uses > ggc_alloced_size_order_for_request. > (ggc_internal_alloc_stat): Use ggc_alloced_size_order_for_request. > * ggc-zone.c (ggc_alloced_size_for_request): New public function > extracted from ggc_internal_alloc_zone_stat. > (ggc_internal_alloc_zone_stat): Use ggc_alloced_size_for_request. > * toplev.c (general_init): Initialize > line_table->alloced_size_for_request.
For the record, the patch is fine with me. (I cannot approve it though, but you already got the approval) Thanks, -- Laurynas