jdk/src/java.base/share/native/libjli/java.c
changeset 28105 f7963af2ae30
parent 27938 7f7f8bf64dd7
parent 28102 0efebd8c99e2
child 28107 587cd87d5c98
equal deleted inserted replaced
28053:b2366f339e39 28105:f7963af2ae30
   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;