Issue Unity-Technologies#37 (bdwgc).
* finalize.c (GC_grow_table): Do not call GC_try_to_collect_inner
if GC_incremental; add comment.
GC_ASSERT(I_HOLD_LOCK());
/* Avoid growing the table in case of at least 25% of entries can */
/* be deleted by enforcing a collection. Ignored for small tables. */
- if (log_old_size >= GC_ON_GROW_LOG_SIZE_MIN) {
+ /* In incremental mode we skip this optimization, as we want to */
+ /* avoid triggering a full GC whenever possible. */
+ if (log_old_size >= GC_ON_GROW_LOG_SIZE_MIN && !GC_incremental) {
IF_CANCEL(int cancel_state;)
DISABLE_CANCEL(cancel_state);