127 mJvmArgs.push_back(L"-Xminf0.1"); // Min percentage of heap free after GC. |
127 mJvmArgs.push_back(L"-Xminf0.1"); // Min percentage of heap free after GC. |
128 mJvmArgs.push_back(L"-Xmaxf0.3"); // Max percentage of heap free after GC. |
128 mJvmArgs.push_back(L"-Xmaxf0.3"); // Max percentage of heap free after GC. |
129 mJvmArgs.push_back(L"-Xmine16K"); // Minimum size for heap expansion. |
129 mJvmArgs.push_back(L"-Xmine16K"); // Minimum size for heap expansion. |
130 mJvmArgs.push_back(L"-Xmns64K"); // Initial new space size. Keep this in sync with MemoryLogger.java |
130 mJvmArgs.push_back(L"-Xmns64K"); // Initial new space size. Keep this in sync with MemoryLogger.java |
131 mJvmArgs.push_back(L"-Xmos64K"); // Initial old space size. Keep this in sync with MemoryLogger.java |
131 mJvmArgs.push_back(L"-Xmos64K"); // Initial old space size. Keep this in sync with MemoryLogger.java |
|
132 |
|
133 #ifdef __WINSCW__ |
132 mJvmArgs.push_back(L"-Xmox16M"); // Maximum old space size. |
134 mJvmArgs.push_back(L"-Xmox16M"); // Maximum old space size. |
133 mJvmArgs.push_back(L"-Xmx16M"); // Memory maximum. |
135 mJvmArgs.push_back(L"-Xmx16M"); // Memory maximum. |
|
136 #else // __WINSCW__ |
|
137 mJvmArgs.push_back(L"-Xmox64M"); // Maximum old space size. |
|
138 mJvmArgs.push_back(L"-Xmx64M"); // Memory maximum. |
|
139 #endif // __WINSCW__ |
|
140 |
134 mJvmArgs.push_back(L"-Xmco16k"); // ROM class segment increment. |
141 mJvmArgs.push_back(L"-Xmco16k"); // ROM class segment increment. |
135 mJvmArgs.push_back(L"-Xmr1k"); // Remembered set size. |
142 mJvmArgs.push_back(L"-Xmr1k"); // Remembered set size. |
136 |
143 |
137 // Set the java home to point either to c:\\resource\\java\\jvm or |
144 // Set the java home to point either to c:\\resource\\java\\jvm or |
138 // z:\\resource\\java\\jvm. Default is z drive if the dir doesn't |
145 // z:\\resource\\java\\jvm. Default is z drive if the dir doesn't |
161 JELOG2(EJavaRuntime); |
168 JELOG2(EJavaRuntime); |
162 std::wstring oldSpace = L"-Xmos"; |
169 std::wstring oldSpace = L"-Xmos"; |
163 oldSpace += JavaCommonUtils::intToWstring(heapSize); |
170 oldSpace += JavaCommonUtils::intToWstring(heapSize); |
164 oldSpace += L"K"; |
171 oldSpace += L"K"; |
165 mJvmArgs.push_back(oldSpace); |
172 mJvmArgs.push_back(oldSpace); |
|
173 } |
|
174 |
|
175 |
|
176 void J9StarterS60::overrideMaxHeapSize(int heapSize) |
|
177 { |
|
178 JELOG2(EJavaRuntime); |
|
179 std::wstring heapAsString(JavaCommonUtils::intToWstring(heapSize)); |
|
180 doOverideHeap(L"-Xmox", heapAsString); |
|
181 doOverideHeap(L"-Xmx", heapAsString); |
|
182 } |
|
183 |
|
184 void J9StarterS60::doOverideHeap(const std::wstring& arg, const std::wstring& size) |
|
185 { |
|
186 JELOG2(EJavaRuntime); |
|
187 std::wstring maxHeapArg(arg); |
|
188 maxHeapArg += size; |
|
189 maxHeapArg += L"K"; |
|
190 mJvmArgs.push_back(maxHeapArg); |
166 } |
191 } |
167 |
192 |
168 void J9StarterS60::overrideNewHeapSize(int heapSize) |
193 void J9StarterS60::overrideNewHeapSize(int heapSize) |
169 { |
194 { |
170 JELOG2(EJavaRuntime); |
195 JELOG2(EJavaRuntime); |