[kaffe] CVS kaffe (robilad): consistently free memory allocated by stringJava2C

Kaffe CVS cvs-commits at kaffe.org
Mon Oct 11 19:04:28 PDT 2004


PatchSet 5275 
Date: 2004/10/12 02:00:19
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
consistently free memory allocated by stringJava2C

2004-10-11  Dalibor Topic <robilad at kaffe.org>

        * kaffe/jvmpi/jvmpi_kaffe.c,
        libraries/clib/management/Classpath.c,
        libraries/clib/management/JIT.c,
        libraries/clib/management/XProfiler.c,
        libraries/clib/native/System.c,
        libraries/clib/native/ZipFile.c:
        Use gc_free instead of KFREE for strings allocated by
        stringJava2C.

Members: 
	ChangeLog:1.2827->1.2828 
	kaffe/jvmpi/jvmpi_kaffe.c:1.5->1.6 
	libraries/clib/management/Classpath.c:1.7->1.8 
	libraries/clib/management/JIT.c:1.7->1.8 
	libraries/clib/management/XProfiler.c:1.3->1.4 
	libraries/clib/native/System.c:1.57->1.58 
	libraries/clib/native/ZipFile.c:1.18->1.19 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2827 kaffe/ChangeLog:1.2828
--- kaffe/ChangeLog:1.2827	Tue Oct 12 01:11:42 2004
+++ kaffe/ChangeLog	Tue Oct 12 02:00:19 2004
@@ -1,5 +1,16 @@
 2004-10-11  Dalibor Topic <robilad at kaffe.org>
 
+	* kaffe/jvmpi/jvmpi_kaffe.c,
+	libraries/clib/management/Classpath.c,
+	libraries/clib/management/JIT.c,
+	libraries/clib/management/XProfiler.c,
+	libraries/clib/native/System.c,
+	libraries/clib/native/ZipFile.c:
+	Use gc_free instead of KFREE for strings allocated by
+	stringJava2C.
+
+2004-10-11  Dalibor Topic <robilad at kaffe.org>
+
 	* libraries/javalib/java/io/PrintStream.java:
 	Resynced with GNU Classpath.
 
Index: kaffe/kaffe/jvmpi/jvmpi_kaffe.c
diff -u kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.5 kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.6
--- kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.5	Fri Mar 12 18:04:24 2004
+++ kaffe/kaffe/jvmpi/jvmpi_kaffe.c	Tue Oct 12 02:00:23 2004
@@ -593,9 +593,9 @@
 			jvmpiFillThreadStart(&ev, tid);
 			ev.event_type |= JVMPI_REQUESTED_EVENT;
 			jvmpiPostEvent(&ev);
-			KFREE(ev.u.thread_start.parent_name);
-			KFREE(ev.u.thread_start.group_name);
-			KFREE(ev.u.thread_start.thread_name);
+			gc_free(ev.u.thread_start.parent_name);
+			gc_free(ev.u.thread_start.group_name);
+			gc_free(ev.u.thread_start.thread_name);
 		}
 		break;
 	case JVMPI_EVENT_OBJECT_ALLOC:
Index: kaffe/libraries/clib/management/Classpath.c
diff -u kaffe/libraries/clib/management/Classpath.c:1.7 kaffe/libraries/clib/management/Classpath.c:1.8
--- kaffe/libraries/clib/management/Classpath.c:1.7	Fri May 28 13:40:12 2004
+++ kaffe/libraries/clib/management/Classpath.c	Tue Oct 12 02:00:23 2004
@@ -26,7 +26,7 @@
 
 	s = checkPtr(stringJava2C(str));
 	addClasspath(s);
-	KFREE(s);
+	gc_free(s);
 }
 
 /*
@@ -39,6 +39,6 @@
 
 	s = checkPtr(stringJava2C(str));
 	prependClasspath(s);
-	KFREE(s);
+	gc_free(s);
 }
 
Index: kaffe/libraries/clib/management/JIT.c
diff -u kaffe/libraries/clib/management/JIT.c:1.7 kaffe/libraries/clib/management/JIT.c:1.8
--- kaffe/libraries/clib/management/JIT.c:1.7	Mon May 31 20:03:21 2004
+++ kaffe/libraries/clib/management/JIT.c	Tue Oct 12 02:00:23 2004
@@ -81,9 +81,9 @@
 	utf8ConstRelease(u8cname);
 	utf8ConstRelease(u8mname);
 	utf8ConstRelease(u8sig);
-	KFREE(cname);
-	KFREE(mname);
-	KFREE(signature);
+	gc_free(cname);
+	gc_free(mname);
+	gc_free(signature);
 }
 
 /*
Index: kaffe/libraries/clib/management/XProfiler.c
diff -u kaffe/libraries/clib/management/XProfiler.c:1.3 kaffe/libraries/clib/management/XProfiler.c:1.4
--- kaffe/libraries/clib/management/XProfiler.c:1.3	Fri May 28 13:40:12 2004
+++ kaffe/libraries/clib/management/XProfiler.c	Tue Oct 12 02:00:23 2004
@@ -41,6 +41,6 @@
 	char *stage_name = stringJava2C(_stage_name);
 
 	xProfileStage(stage_name);
-	KFREE(stage_name);
+	gc_free(stage_name);
 #endif
 }
Index: kaffe/libraries/clib/native/System.c
diff -u kaffe/libraries/clib/native/System.c:1.57 kaffe/libraries/clib/native/System.c:1.58
--- kaffe/libraries/clib/native/System.c:1.57	Sat Sep 25 16:39:56 2004
+++ kaffe/libraries/clib/native/System.c	Tue Oct 12 02:00:24 2004
@@ -475,7 +475,7 @@
 
 	s = checkPtr(stringJava2C(str));
 	dprintf("%s\n", s);
-	KFREE(s);
+	gc_free(s);
 }
 
 void
@@ -491,7 +491,7 @@
 	if (msg) {
 		s = checkPtr(stringJava2C(msg));
 		dprintf("%s: %s\n", cname, s);
-		KFREE(s);
+		gc_free(s);
 	} else {
 		dprintf("%s\n", cname);
 	}
Index: kaffe/libraries/clib/native/ZipFile.c
diff -u kaffe/libraries/clib/native/ZipFile.c:1.18 kaffe/libraries/clib/native/ZipFile.c:1.19
--- kaffe/libraries/clib/native/ZipFile.c:1.18	Fri May 21 15:19:24 2004
+++ kaffe/libraries/clib/native/ZipFile.c	Tue Oct 12 02:00:24 2004
@@ -31,7 +31,7 @@
 
 	str = checkPtr(stringJava2C(fname));
 	zip = openJarFile(str);
-	KFREE(str);
+	gc_free(str);
 	return ((struct Hkaffe_util_Ptr*)zip);
 }
 
@@ -56,7 +56,7 @@
 
 	str = checkPtr(stringJava2C(zname));
 	entry = lookupJarFile((jarFile*)zip, str);
-	KFREE(str);
+	gc_free(str);
 	if (entry == 0) {
 		return (0);
 	}




More information about the kaffe mailing list