javaruntimes/starterutils/src.s60/j9starters60.cpp
changeset 61 bf7ee68962da
parent 35 85266cc22c7f
child 67 63b81d807542
--- a/javaruntimes/starterutils/src.s60/j9starters60.cpp	Tue Jul 06 14:10:26 2010 +0300
+++ b/javaruntimes/starterutils/src.s60/j9starters60.cpp	Wed Aug 18 09:43:15 2010 +0300
@@ -129,8 +129,15 @@
     mJvmArgs.push_back(L"-Xmine16K"); // Minimum size for heap expansion.
     mJvmArgs.push_back(L"-Xmns64K");  // Initial new space size. Keep this in sync with MemoryLogger.java
     mJvmArgs.push_back(L"-Xmos64K");  // Initial old space size. Keep this in sync with MemoryLogger.java
+
+#ifdef __WINSCW__
     mJvmArgs.push_back(L"-Xmox16M");  // Maximum old space size.
     mJvmArgs.push_back(L"-Xmx16M");   // Memory maximum.
+#else // __WINSCW__
+    mJvmArgs.push_back(L"-Xmox64M");  // Maximum old space size.
+    mJvmArgs.push_back(L"-Xmx64M");   // Memory maximum.
+#endif  // __WINSCW__
+
     mJvmArgs.push_back(L"-Xmco16k");  // ROM class segment increment.
     mJvmArgs.push_back(L"-Xmr1k");    // Remembered set size.
 
@@ -165,6 +172,24 @@
     mJvmArgs.push_back(oldSpace);
 }
 
+
+void J9StarterS60::overrideMaxHeapSize(int heapSize)
+{
+    JELOG2(EJavaRuntime);
+    std::wstring heapAsString(JavaCommonUtils::intToWstring(heapSize));
+    doOverideHeap(L"-Xmox", heapAsString);
+    doOverideHeap(L"-Xmx", heapAsString);
+}
+
+void J9StarterS60::doOverideHeap(const std::wstring& arg, const std::wstring& size)
+{
+    JELOG2(EJavaRuntime);
+	std::wstring maxHeapArg(arg);
+    maxHeapArg += size;
+    maxHeapArg += L"K";
+    mJvmArgs.push_back(maxHeapArg);
+}
+
 void J9StarterS60::overrideNewHeapSize(int heapSize)
 {
     JELOG2(EJavaRuntime);