From b6f611637e7411536dc883100c543547f4b7c03a Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Mon, 27 Oct 2003 00:26:52 +0000 Subject: ggc-zone.c: New file, zone allocating collector. 2003-10-26 Daniel Berlin * ggc-zone.c: New file, zone allocating collector. * configure: Accept zone option for --with-gc * configure.in: Ditto. * ggc.h (ggc_pch_count_object): Pass bool indicating stringiness. Update all callers. (ggc_pch_alloc_object): Ditto. (ggc_pch_write_object): Ditto. (ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single type. (ggc_alloc_rtvec): Ditto. (ggc_alloc_tree): Use zone allocation, since some things using this macro aren't a single typecode. * ggc-none.c (ggc_alloc_typed): New function. (ggc_alloc_zone): Ditto. * ggc-page.c: Ditto on both functions. From-SVN: r72971 --- gcc/ggc-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/ggc-common.c') diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 5f0d11d..eab766e 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -328,7 +328,7 @@ call_count (void **slot, void *state_p) struct ptr_data *d = (struct ptr_data *)*slot; struct traversal_state *state = (struct traversal_state *)state_p; - ggc_pch_count_object (state->d, d->obj, d->size); + ggc_pch_count_object (state->d, d->obj, d->size, d->note_ptr_fn == gt_pch_p_S); state->count++; return 1; } @@ -339,7 +339,7 @@ call_alloc (void **slot, void *state_p) struct ptr_data *d = (struct ptr_data *)*slot; struct traversal_state *state = (struct traversal_state *)state_p; - d->new_addr = ggc_pch_alloc_object (state->d, d->obj, d->size); + d->new_addr = ggc_pch_alloc_object (state->d, d->obj, d->size, d->note_ptr_fn == gt_pch_p_S); state->ptrs[state->ptrs_i++] = d; return 1; } @@ -524,7 +524,7 @@ gt_pch_save (FILE *f) state.ptrs[i]->note_ptr_cookie, relocate_ptrs, &state); ggc_pch_write_object (state.d, state.f, state.ptrs[i]->obj, - state.ptrs[i]->new_addr, state.ptrs[i]->size); + state.ptrs[i]->new_addr, state.ptrs[i]->size, state.ptrs[i]->note_ptr_fn == gt_pch_p_S); if (state.ptrs[i]->note_ptr_fn != gt_pch_p_S) memcpy (state.ptrs[i]->obj, this_object, state.ptrs[i]->size); } -- cgit v1.1