Author: martin
Date: 2007-07-19 03:36:16 -0400 (Thu, 19 Jul 2007)
New Revision: 82267
Modified:
branches/martin/debugger-dublin/runtime/metadata/mono-debug.c
Log:
Correct lock/unlock - this fixes the performance leak.
Modified: branches/martin/debugger-dublin/runtime/metadata/mono-debug.c
===================================================================
--- branches/martin/debugger-dublin/runtime/metadata/mono-debug.c
2007-07-19 05:40:21 UTC (rev 82266)
+++ branches/martin/debugger-dublin/runtime/metadata/mono-debug.c
2007-07-19 07:36:16 UTC (rev 82267)
@@ -158,8 +158,6 @@
mono_symbol_table->version = MONO_DEBUGGER_VERSION;
mono_symbol_table->total_size = sizeof (MonoSymbolTable);
- g_message (G_STRLOC ": %d", mono_debug_debugger_version);
-
mono_debug_data_table = g_malloc0 (sizeof (MonoDebugDataTable) +
DATA_TABLE_CHUNK_SIZE);
mono_debug_data_table->total_size = DATA_TABLE_CHUNK_SIZE;
@@ -1131,6 +1129,8 @@
(klass->byval_arg.type == MONO_TYPE_VAR) || (klass->byval_arg.type
== MONO_TYPE_MVAR))
return;
+ mono_debugger_lock ();
+
max_size = 12 + sizeof (gpointer);
if (max_size > BUFSIZ)
ptr = oldptr = g_malloc (max_size);
@@ -1165,6 +1165,8 @@
g_free (oldptr);
mono_debugger_add_type (handle, klass);
+
+ mono_debugger_unlock ();
}
static MonoDebugMethodJitInfo *
@@ -1243,6 +1245,7 @@
ptr += sizeof (gpointer);
}
+ mono_debugger_unlock ();
return info;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches