src/hotspot/os/linux/os_linux.cpp
changeset 47881 0ce0ac68ace7
parent 47765 b7c7428eaab9
child 47903 7f22774a5f42
equal deleted inserted replaced
47824:cf127be65014 47881:0ce0ac68ace7
  4803 
  4803 
  4804   os::Posix::init_2();
  4804   os::Posix::init_2();
  4805 
  4805 
  4806   Linux::fast_thread_clock_init();
  4806   Linux::fast_thread_clock_init();
  4807 
  4807 
  4808   // Allocate a single page and mark it as readable for safepoint polling
       
  4809   address polling_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
       
  4810   guarantee(polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page");
       
  4811 
       
  4812   os::set_polling_page(polling_page);
       
  4813   log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page));
       
  4814 
       
  4815   if (!UseMembar) {
       
  4816     address mem_serialize_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
       
  4817     guarantee(mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page");
       
  4818     os::set_memory_serialize_page(mem_serialize_page);
       
  4819     log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(mem_serialize_page));
       
  4820   }
       
  4821 
       
  4822   // initialize suspend/resume support - must do this before signal_sets_init()
  4808   // initialize suspend/resume support - must do this before signal_sets_init()
  4823   if (SR_initialize() != 0) {
  4809   if (SR_initialize() != 0) {
  4824     perror("SR_initialize failed");
  4810     perror("SR_initialize failed");
  4825     return JNI_ERR;
  4811     return JNI_ERR;
  4826   }
  4812   }