Browse Source

2004-01-13 Zoltan Varga <[email protected]>

	* debug-mini.c (record_line_number): Get rid of unneccesary memory
	allocation.

svn path=/trunk/mono/; revision=22015
Zoltan Varga 22 years ago
parent
commit
aeda98a415
2 changed files with 10 additions and 5 deletions
  1. 5 0
      mono/mini/ChangeLog
  2. 5 5
      mono/mini/debug-mini.c

+ 5 - 0
mono/mini/ChangeLog

@@ -1,3 +1,8 @@
+2004-01-13  Zoltan Varga  <[email protected]>
+
+	* debug-mini.c (record_line_number): Get rid of unneccesary memory
+	allocation.
+
 2004-01-09  Zoltan Varga  <[email protected]>
 
 	* exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 

+ 5 - 5
mono/mini/debug-mini.c

@@ -16,15 +16,15 @@
 #include "config.h"
 #include <mono/metadata/mono-debug-debugger.h>
 
-static void
+static inline void
 record_line_number (MonoDebugMethodJitInfo *jit, guint32 address, guint32 offset)
 {
-	MonoDebugLineNumberEntry *lne = g_new0 (MonoDebugLineNumberEntry, 1);
+	MonoDebugLineNumberEntry lne;
 
-	lne->address = address;
-	lne->offset = offset;
+	lne.address = address;
+	lne.offset = offset;
 
-	g_array_append_val (jit->line_numbers, *lne);
+	g_array_append_val (jit->line_numbers, lne);
 }
 
 typedef struct