X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fsgen-old-bridge.c;h=12f82b07f725afa8c0bfad012269a0a480a36814;hb=HEAD;hp=d33d5d86815d795db6168cf97b9e0f24b9c3f1ff;hpb=aef549e364e3d7b1c8959900a99852fec39bc3a2;p=mono.git diff --git a/mono/metadata/sgen-old-bridge.c b/mono/metadata/sgen-old-bridge.c index d33d5d86815..12f82b07f72 100644 --- a/mono/metadata/sgen-old-bridge.c +++ b/mono/metadata/sgen-old-bridge.c @@ -1,5 +1,6 @@ -/* - * sgen-bridge.c: Simple generational GC. +/** + * \file + * Simple generational GC. * * Copyright 2011 Novell, Inc (http://www.novell.com) * Copyright 2011 Xamarin Inc (http://www.xamarin.com) @@ -372,11 +373,13 @@ dyn_array_int_merge_one (DynIntArray *array, int value) static void -enable_accounting (void) +set_config (const SgenBridgeProcessorConfig *config) { - SgenHashTable table = SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL); - bridge_accounting_enabled = TRUE; - hash_table = table; + if (config->accounting) { + SgenHashTable table = SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL); + bridge_accounting_enabled = TRUE; + hash_table = table; + } } static MonoGCBridgeObjectKind @@ -922,7 +925,7 @@ sgen_old_bridge_init (SgenBridgeProcessor *collector) collector->class_kind = class_kind; collector->register_finalized_object = register_finalized_object; collector->describe_pointer = describe_pointer; - collector->enable_accounting = enable_accounting; + collector->set_config = set_config; bridge_processor = collector; }