X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fmono-hash.c;h=49fac50c681e62f74e823ec6f9808bf6a7048c88;hb=aa3de31b70d1c5826d67147696423cdd9c334d41;hp=a640239d655b98d153157713f7921d0e0c6224a5;hpb=16317446d9b58e89362de5eb3e2a098d411aef00;p=mono.git diff --git a/mono/metadata/mono-hash.c b/mono/metadata/mono-hash.c index a640239d655..49fac50c681 100644 --- a/mono/metadata/mono-hash.c +++ b/mono/metadata/mono-hash.c @@ -65,18 +65,10 @@ struct _MonoGHashTable { MonoGHashGCType gc_type; }; -static const int prime_tbl[] = { - 11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237, - 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, - 47431, 71143, 106721, 160073, 240101, 360163, - 540217, 810343, 1215497, 1823231, 2734867, 4102283, - 6153409, 9230113, 13845163 -}; - #ifdef HAVE_SGEN_GC static void *table_hash_descr = NULL; -static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func); +static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data); static Slot* new_slot (MonoGHashTable *hash) @@ -489,7 +481,7 @@ mono_g_hash_table_print_stats (MonoGHashTable *table) /* GC marker function */ static void -mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func) +mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data) { MonoGHashTable *table = (MonoGHashTable*)addr; Slot *node; @@ -499,23 +491,23 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func) for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->key) - mark_func (&node->key); + mark_func (&node->key, gc_data); } } } else if (table->gc_type == MONO_HASH_VALUE_GC) { for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->value) - mark_func (&node->value); + mark_func (&node->value, gc_data); } } } else if (table->gc_type == MONO_HASH_KEY_VALUE_GC) { for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->key) - mark_func (&node->key); + mark_func (&node->key, gc_data); if (node->value) - mark_func (&node->value); + mark_func (&node->value, gc_data); } } }