src/JavaVM.st
branchjk_new_structure
changeset 1525 4463b11f29f4
parent 1524 b74a62ba8cc1
child 1527 c12b45a59659
--- a/src/JavaVM.st	Wed Jul 11 09:40:08 2012 +0000
+++ b/src/JavaVM.st	Mon Jul 16 15:00:31 2012 +0000
@@ -49,7 +49,7 @@
 		ZipLastModTimesCache ZipInflaters JavaPrivilegedAccessQuery
 		ClassRegistry SystemClassLoader ExtClassLoader StartupTime
 		FinalizationEnabled FinalizationLobby ParkUnparkSemaphores
-		threadInterrupts EagerResolvingEnabled'
+		threadInterrupts EagerResolvingEnabled OldspaceIncreased'
 	poolDictionaries:'JavaConstants'
 	category:'Languages-Java-Support'
 !
@@ -1851,11 +1851,20 @@
 !
 
 initializeVM
+
     "/Native code optimization is broken (for now), force-disable it"
-    
     ObjectMemory javaNativeCodeOptimization: false.
-     "Java requires a huge stack. Change default to 4 MB."
+    
+    "Java requires a huge stack. Change default to 4 MB."
     Process defaultMaximumStackSize: 1024 * 1024 * 4.
+    
+    "Java Classes are huge and there is a (unfixed) bug in 2-phase oldspace
+     compress, so try to avoid it by pre-allocating more oldspace."
+    OldspaceIncreased ~~ true ifTrue:[
+        ObjectMemory moreOldSpace: 16"MB"*(1024*1024).
+        OldspaceIncreased := true.
+    ].
+
     ClassRegistry := JavaClassRegistry for: self.
     ClassLoaderQuerySignal := Query new.
     JavaObject autoload.
@@ -16885,13 +16894,13 @@
         "putDouble(JD)V"
         o := nativeContext argAt: 1.
         x := nativeContext argAt: 3.
-        SimulatedNativeMemory longAt: o put: x.
+        SimulatedNativeMemory sint64At: o put: x.
         ^nil
     ].
     self internalError:'Unknown variant of putLong() native!!'
 
     "Created: / 07-12-2010 / 23:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 30-08-2011 / 16:01:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-07-2012 / 16:03:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 _sun_misc_Unsafe_putObject: nativeContext