(a cherry-pick of commit
84053cd2 from 'release-7_4')
* mark.c (GC_push_selected): In case of a danger of mark stack overflow
after the first GC_push_all() call then call GC_push_all(bottom, top)
and return; remove redundant checking of GC_mark_stack_top at the end
of the function (overflow is already checked in GC_push_all).
return;
}
if ((*dirty_fn)(h-1)) {
+ if ((word)(GC_mark_stack_top - GC_mark_stack)
+ > 3 * GC_mark_stack_size / 4) {
+ GC_push_all(bottom, top);
+ return;
+ }
GC_push_all(bottom, (ptr_t)h);
}
if ((ptr_t)h != top && (*dirty_fn)(h)) {
GC_push_all((ptr_t)h, top);
}
- if (GC_mark_stack_top >= GC_mark_stack_limit) {
- ABORT("Unexpected mark stack overflow");
- }
}
void GC_push_conditional(ptr_t bottom, ptr_t top, GC_bool all)