3386 guarantee( polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page" ); 3387 3388 os::set_polling_page( polling_page ); 3389 3390 #ifndef PRODUCT 3391 if(Verbose && PrintMiscellaneous) 3392 tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page); 3393 #endif 3394 3395 if (!UseMembar) { 3396 address mem_serialize_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); 3397 guarantee( mem_serialize_page != NULL, "mmap Failed for memory serialize page"); 3398 os::set_memory_serialize_page( mem_serialize_page ); 3399 3400 #ifndef PRODUCT 3401 if(Verbose && PrintMiscellaneous) 3402 tty->print("[Memory Serialize Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page); 3403 #endif 3404 } 3405 3406 os::large_page_init(); 3407 3408 // initialize suspend/resume support - must do this before signal_sets_init() 3409 if (SR_initialize() != 0) { 3410 perror("SR_initialize failed"); 3411 return JNI_ERR; 3412 } 3413 3414 Bsd::signal_sets_init(); 3415 Bsd::install_signal_handlers(); 3416 3417 // Check minimum allowable stack size for thread creation and to initialize 3418 // the java system classes, including StackOverflowError - depends on page 3419 // size. Add a page for compiler2 recursion in main thread. 3420 // Add in 2*BytesPerWord times page size to account for VM stack during 3421 // class initialization depending on 32 or 64 bit VM. 3422 os::Bsd::min_stack_allowed = MAX2(os::Bsd::min_stack_allowed, 3423 (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ 3424 2*BytesPerWord COMPILER2_PRESENT(+1)) * Bsd::page_size()); 3425 3426 size_t threadStackSizeInBytes = ThreadStackSize * K; 3427 if (threadStackSizeInBytes != 0 && | 3386 guarantee( polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page" ); 3387 3388 os::set_polling_page( polling_page ); 3389 3390 #ifndef PRODUCT 3391 if(Verbose && PrintMiscellaneous) 3392 tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page); 3393 #endif 3394 3395 if (!UseMembar) { 3396 address mem_serialize_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); 3397 guarantee( mem_serialize_page != NULL, "mmap Failed for memory serialize page"); 3398 os::set_memory_serialize_page( mem_serialize_page ); 3399 3400 #ifndef PRODUCT 3401 if(Verbose && PrintMiscellaneous) 3402 tty->print("[Memory Serialize Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page); 3403 #endif 3404 } 3405 3406 // initialize suspend/resume support - must do this before signal_sets_init() 3407 if (SR_initialize() != 0) { 3408 perror("SR_initialize failed"); 3409 return JNI_ERR; 3410 } 3411 3412 Bsd::signal_sets_init(); 3413 Bsd::install_signal_handlers(); 3414 3415 // Check minimum allowable stack size for thread creation and to initialize 3416 // the java system classes, including StackOverflowError - depends on page 3417 // size. Add a page for compiler2 recursion in main thread. 3418 // Add in 2*BytesPerWord times page size to account for VM stack during 3419 // class initialization depending on 32 or 64 bit VM. 3420 os::Bsd::min_stack_allowed = MAX2(os::Bsd::min_stack_allowed, 3421 (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ 3422 2*BytesPerWord COMPILER2_PRESENT(+1)) * Bsd::page_size()); 3423 3424 size_t threadStackSizeInBytes = ThreadStackSize * K; 3425 if (threadStackSizeInBytes != 0 && |