3572 guarantee( polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page" );
3573
3574 os::set_polling_page( polling_page );
3575
3576 #ifndef PRODUCT
3577 if(Verbose && PrintMiscellaneous)
3578 tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page);
3579 #endif
3580
3581 if (!UseMembar) {
3582 address mem_serialize_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3583 guarantee( mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page");
3584 os::set_memory_serialize_page( mem_serialize_page );
3585
3586 #ifndef PRODUCT
3587 if(Verbose && PrintMiscellaneous)
3588 tty->print("[Memory Serialize Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page);
3589 #endif
3590 }
3591
3592 os::large_page_init();
3593
3594 // initialize suspend/resume support - must do this before signal_sets_init()
3595 if (SR_initialize() != 0) {
3596 perror("SR_initialize failed");
3597 return JNI_ERR;
3598 }
3599
3600 Bsd::signal_sets_init();
3601 Bsd::install_signal_handlers();
3602
3603 // Check minimum allowable stack size for thread creation and to initialize
3604 // the java system classes, including StackOverflowError - depends on page
3605 // size. Add a page for compiler2 recursion in main thread.
3606 // Add in 2*BytesPerWord times page size to account for VM stack during
3607 // class initialization depending on 32 or 64 bit VM.
3608 os::Bsd::min_stack_allowed = MAX2(os::Bsd::min_stack_allowed,
3609 (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
3610 2*BytesPerWord COMPILER2_PRESENT(+1)) * Bsd::page_size());
3611
3612 size_t threadStackSizeInBytes = ThreadStackSize * K;
3613 if (threadStackSizeInBytes != 0 &&
|
3572 guarantee( polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page" );
3573
3574 os::set_polling_page( polling_page );
3575
3576 #ifndef PRODUCT
3577 if(Verbose && PrintMiscellaneous)
3578 tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page);
3579 #endif
3580
3581 if (!UseMembar) {
3582 address mem_serialize_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3583 guarantee( mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page");
3584 os::set_memory_serialize_page( mem_serialize_page );
3585
3586 #ifndef PRODUCT
3587 if(Verbose && PrintMiscellaneous)
3588 tty->print("[Memory Serialize Page address: " INTPTR_FORMAT "]\n", (intptr_t)mem_serialize_page);
3589 #endif
3590 }
3591
3592 // initialize suspend/resume support - must do this before signal_sets_init()
3593 if (SR_initialize() != 0) {
3594 perror("SR_initialize failed");
3595 return JNI_ERR;
3596 }
3597
3598 Bsd::signal_sets_init();
3599 Bsd::install_signal_handlers();
3600
3601 // Check minimum allowable stack size for thread creation and to initialize
3602 // the java system classes, including StackOverflowError - depends on page
3603 // size. Add a page for compiler2 recursion in main thread.
3604 // Add in 2*BytesPerWord times page size to account for VM stack during
3605 // class initialization depending on 32 or 64 bit VM.
3606 os::Bsd::min_stack_allowed = MAX2(os::Bsd::min_stack_allowed,
3607 (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
3608 2*BytesPerWord COMPILER2_PRESENT(+1)) * Bsd::page_size());
3609
3610 size_t threadStackSizeInBytes = ThreadStackSize * K;
3611 if (threadStackSizeInBytes != 0 &&
|