[kaffe] CVS kaffe (hkraemer): adapted internal jit test to changes in the gc

Kaffe CVS cvs-commits at kaffe.org
Mon Sep 29 03:04:02 PDT 2003


PatchSet 4080 
Date: 2003/09/29 10:01:57
Author: hkraemer
Branch: HEAD
Tag: (none) 
Log:
adapted internal jit test to changes in the gc

Members: 
	ChangeLog:1.1675->1.1676 
	kaffe/kaffevm/mem/gc-mem.c:1.47->1.48 
	test/internal/jit_stub.c:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1675 kaffe/ChangeLog:1.1676
--- kaffe/ChangeLog:1.1675	Mon Sep 29 05:55:19 2003
+++ kaffe/ChangeLog	Mon Sep 29 10:01:57 2003
@@ -1,3 +1,11 @@
+2003-09-29  Helmer Kraemer  <hkraemer at freenet.de>
+
+	* kaffe/kaffevm/mem/gc-mem.c: (gc_heap_grow) don't forget
+	to unlock the gc_heap_lock if we bail out early
+
+	* test/internal/jit_stub.c: (main) initialise Kaffe_JavaVMArgs[0]
+	before initialising the collector
+	
 2003-09-29  Guilhem Lavaux <guilhem at kaffe.org>
 
 	* libraries/javalib/java/text/SimpleDateFormat.java,
@@ -48,7 +56,6 @@
 	Added prototypes for setupExceptionHandling,
 	cleanupExceptionHandling.
 
->>>>>>> 1.1674
 2003-09-28  Guilhem Lavaux <guilhem at kaffe.org>
 
 	* libraries/javalib/java/nio/ByteBufferHelper.java: added missing
Index: kaffe/kaffe/kaffevm/mem/gc-mem.c
diff -u kaffe/kaffe/kaffevm/mem/gc-mem.c:1.47 kaffe/kaffe/kaffevm/mem/gc-mem.c:1.48
--- kaffe/kaffe/kaffevm/mem/gc-mem.c:1.47	Sun Sep 28 19:47:41 2003
+++ kaffe/kaffe/kaffevm/mem/gc-mem.c	Mon Sep 29 10:01:59 2003
@@ -1070,6 +1070,7 @@
 	lockStaticMutex(&gc_heap_lock);
 
 	if (gc_heap_total == gc_heap_limit) {
+		unlockStaticMutex(&gc_heap_lock);
 		return (0);
 	} else if (gc_heap_total + sz > gc_heap_limit) {
 		/* take as much memory as we can */
@@ -1087,6 +1088,7 @@
 	    dprintf("gc_system_alloc: %ld byte at %p\n", (long) sz, blk); )
 
 	if (blk == 0) {
+		unlockStaticMutex(&gc_heap_lock);
 		return (0);
 	}
 
Index: kaffe/test/internal/jit_stub.c
diff -u kaffe/test/internal/jit_stub.c:1.3 kaffe/test/internal/jit_stub.c:1.4
--- kaffe/test/internal/jit_stub.c:1.3	Sun Jul 27 21:42:23 2003
+++ kaffe/test/internal/jit_stub.c	Mon Sep 29 10:01:59 2003
@@ -98,12 +98,12 @@
 	INIT_MD();
 #endif
 
+	Kaffe_JavaVMArgs[0] = vmargs;
+	threadStackSize = Kaffe_JavaVMArgs[0].nativeStackSize;
+	
 	/* Register allocation types with gc subsystem */
 	main_collector = initCollector();
 	GC_init(main_collector);
-
-	Kaffe_JavaVMArgs[0] = vmargs;
-        threadStackSize = Kaffe_JavaVMArgs[0].nativeStackSize;
 
 	/* Initialise the (native) threading system */
 	initNativeThreads(threadStackSize);




More information about the kaffe mailing list