projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5499df2
)
[coop] Avoid taking the gc lock when rehashing mono_g_hash tables, its not needed...
author
Zoltan Varga
<vargaz@gmail.com>
Mon, 17 Aug 2015 19:21:25 +0000
(15:21 -0400)
committer
Zoltan Varga
<vargaz@gmail.com>
Mon, 17 Aug 2015 19:21:45 +0000
(15:21 -0400)
mono/metadata/mono-hash.c
patch
|
blob
|
history
diff --git
a/mono/metadata/mono-hash.c
b/mono/metadata/mono-hash.c
index 7ca1ebe857d0cba30c3ccc5eefa03abdff4df0a5..c450f94752cc88de86971e010222649902ad3e90 100644
(file)
--- a/
mono/metadata/mono-hash.c
+++ b/
mono/metadata/mono-hash.c
@@
-221,7
+221,12
@@
rehash (MonoGHashTable *hash)
data.new_size = g_spaced_primes_closest (hash->in_use);
data.table = mg_new0 (Slot *, data.new_size);
+#ifdef USE_COOP_GC
+ /* We cannot be preempted */
+ old_table = do_rehash (&data);
+#else
old_table = mono_gc_invoke_with_gc_lock (do_rehash, &data);
+#endif
mg_free (old_table);
}