diff options
author | Jonathan Chambers <joncham@gmail.com> | 2019-09-26 18:13:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-26 18:13:42 +0300 |
commit | d962884ab8ae4e7b48d9f77b6512c6b580098dc3 (patch) | |
tree | 40a1f6463902215d446c2c815712c4d93d2f8e15 | |
parent | 5acfcb420d91d4656467c125dbcea2ed18b013d4 (diff) | |
parent | ad169264a6c1c9687eea1212e4f0eec3a4d1d016 (diff) |
Merge pull request #45 from Unity-Technologies/unity-master-avoid-finalizer-table-force-gc
Disable collect call to avoid table growth that was enabled to addres…
-rw-r--r-- | finalize.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -124,8 +124,9 @@ STATIC void GC_grow_table(struct hash_chain_entry ***table, 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. */ - /* In incremental mode we skip this optimization, as we want to */ + /* UNITY: we always skip this optimization, as we want to */ /* avoid triggering a full GC whenever possible. */ +#ifdef UNITY_ENABLE_GC_ON_GROW_LOG_SIZE_MIN if (log_old_size >= GC_ON_GROW_LOG_SIZE_MIN && !GC_incremental) { IF_CANCEL(int cancel_state;) @@ -136,6 +137,7 @@ STATIC void GC_grow_table(struct hash_chain_entry ***table, if (*entries_ptr < ((word)1 << log_old_size) - (*entries_ptr >> 2)) return; } +#endif new_table = (struct hash_chain_entry **) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE( |