equal
deleted
inserted
replaced
165 * create a new thread to invoke JVM. See 6316197 for more information. |
165 * create a new thread to invoke JVM. See 6316197 for more information. |
166 */ |
166 */ |
167 static jlong threadStackSize = 0; /* stack size of the new thread */ |
167 static jlong threadStackSize = 0; /* stack size of the new thread */ |
168 static jlong maxHeapSize = 0; /* max heap size */ |
168 static jlong maxHeapSize = 0; /* max heap size */ |
169 static jlong initialHeapSize = 0; /* inital heap size */ |
169 static jlong initialHeapSize = 0; /* inital heap size */ |
|
170 |
|
171 /* |
|
172 * A minimum -Xss stack size suitable for all platforms. |
|
173 */ |
|
174 #ifndef STACK_SIZE_MINIMUM |
|
175 #define STACK_SIZE_MINIMUM (32 * KB) |
|
176 #endif |
170 |
177 |
171 /* |
178 /* |
172 * Entry point. |
179 * Entry point. |
173 */ |
180 */ |
174 int |
181 int |
764 |
771 |
765 if (JLI_StrCCmp(str, "-Xss") == 0) { |
772 if (JLI_StrCCmp(str, "-Xss") == 0) { |
766 jlong tmp; |
773 jlong tmp; |
767 if (parse_size(str + 4, &tmp)) { |
774 if (parse_size(str + 4, &tmp)) { |
768 threadStackSize = tmp; |
775 threadStackSize = tmp; |
|
776 /* |
|
777 * Make sure the thread stack size is big enough that we won't get a stack |
|
778 * overflow before the JVM startup code can check to make sure the stack |
|
779 * is big enough. |
|
780 */ |
|
781 if (threadStackSize < STACK_SIZE_MINIMUM) { |
|
782 threadStackSize = STACK_SIZE_MINIMUM; |
|
783 } |
769 } |
784 } |
770 } |
785 } |
771 |
786 |
772 if (JLI_StrCCmp(str, "-Xmx") == 0) { |
787 if (JLI_StrCCmp(str, "-Xmx") == 0) { |
773 jlong tmp; |
788 jlong tmp; |