src/os/solaris/vm/os_solaris.cpp

Print this page
rev 5146 : imported patch first-patch


5161     polling_page = (address)Solaris::mmap_chunk(NULL, page_size, MAP_PRIVATE,
5162                                                 PROT_READ);
5163   }
5164 
5165   os::set_polling_page(polling_page);
5166 
5167 #ifndef PRODUCT
5168   if( Verbose && PrintMiscellaneous )
5169     tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page);
5170 #endif
5171 
5172   if (!UseMembar) {
5173     address mem_serialize_page = (address)Solaris::mmap_chunk( NULL, page_size, MAP_PRIVATE, PROT_READ | PROT_WRITE );
5174     guarantee( mem_serialize_page != NULL, "mmap Failed for memory serialize page");
5175     os::set_memory_serialize_page( mem_serialize_page );
5176 
5177 #ifndef PRODUCT
5178     if(Verbose && PrintMiscellaneous)
5179       tty->print("[Memory Serialize  Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page);
5180 #endif
5181 }
5182 
5183   os::large_page_init();
5184 
5185   // Check minimum allowable stack size for thread creation and to initialize
5186   // the java system classes, including StackOverflowError - depends on page
5187   // size.  Add a page for compiler2 recursion in main thread.
5188   // Add in 2*BytesPerWord times page size to account for VM stack during
5189   // class initialization depending on 32 or 64 bit VM.
5190   os::Solaris::min_stack_allowed = MAX2(os::Solaris::min_stack_allowed,
5191             (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
5192                     2*BytesPerWord COMPILER2_PRESENT(+1)) * page_size);
5193 
5194   size_t threadStackSizeInBytes = ThreadStackSize * K;
5195   if (threadStackSizeInBytes != 0 &&
5196     threadStackSizeInBytes < os::Solaris::min_stack_allowed) {
5197     tty->print_cr("\nThe stack size specified is too small, Specify at least %dk",
5198                   os::Solaris::min_stack_allowed/K);
5199     return JNI_ERR;
5200   }
5201 
5202   // For 64kbps there will be a 64kb page size, which makes
5203   // the usable default stack size quite a bit less.  Increase the




5161     polling_page = (address)Solaris::mmap_chunk(NULL, page_size, MAP_PRIVATE,
5162                                                 PROT_READ);
5163   }
5164 
5165   os::set_polling_page(polling_page);
5166 
5167 #ifndef PRODUCT
5168   if( Verbose && PrintMiscellaneous )
5169     tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page);
5170 #endif
5171 
5172   if (!UseMembar) {
5173     address mem_serialize_page = (address)Solaris::mmap_chunk( NULL, page_size, MAP_PRIVATE, PROT_READ | PROT_WRITE );
5174     guarantee( mem_serialize_page != NULL, "mmap Failed for memory serialize page");
5175     os::set_memory_serialize_page( mem_serialize_page );
5176 
5177 #ifndef PRODUCT
5178     if(Verbose && PrintMiscellaneous)
5179       tty->print("[Memory Serialize  Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page);
5180 #endif
5181   }


5182 
5183   // Check minimum allowable stack size for thread creation and to initialize
5184   // the java system classes, including StackOverflowError - depends on page
5185   // size.  Add a page for compiler2 recursion in main thread.
5186   // Add in 2*BytesPerWord times page size to account for VM stack during
5187   // class initialization depending on 32 or 64 bit VM.
5188   os::Solaris::min_stack_allowed = MAX2(os::Solaris::min_stack_allowed,
5189             (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
5190                     2*BytesPerWord COMPILER2_PRESENT(+1)) * page_size);
5191 
5192   size_t threadStackSizeInBytes = ThreadStackSize * K;
5193   if (threadStackSizeInBytes != 0 &&
5194     threadStackSizeInBytes < os::Solaris::min_stack_allowed) {
5195     tty->print_cr("\nThe stack size specified is too small, Specify at least %dk",
5196                   os::Solaris::min_stack_allowed/K);
5197     return JNI_ERR;
5198   }
5199 
5200   // For 64kbps there will be a 64kb page size, which makes
5201   // the usable default stack size quite a bit less.  Increase the