< prev index next >

src/os/solaris/vm/os_solaris.cpp

Print this page
rev 8362 : CMS fence eliding using fancy synchronization when using UseCondCardMark


4753   if (PerfAllowAtExitRegistration) {
4754     // only register atexit functions if PerfAllowAtExitRegistration is set.
4755     // atexit functions can be delayed until process exit time, which
4756     // can be problematic for embedded VM situations. Embedded VMs should
4757     // call DestroyJavaVM() to assure that VM resources are released.
4758 
4759     // note: perfMemory_exit_helper atexit function may be removed in
4760     // the future if the appropriate cleanup code can be added to the
4761     // VM_Exit VMOperation's doit method.
4762     if (atexit(perfMemory_exit_helper) != 0) {
4763       warning("os::init2 atexit(perfMemory_exit_helper) failed");
4764     }
4765   }
4766 
4767   // Init pset_loadavg function pointer
4768   init_pset_getloadavg_ptr();
4769 
4770   return JNI_OK;
4771 }
4772 






4773 // Mark the polling page as unreadable
4774 void os::make_polling_page_unreadable(void) {
4775   if (mprotect((char *)_polling_page, page_size, PROT_NONE) != 0) {
4776     fatal("Could not disable polling page");
4777   }
4778 }
4779 
4780 // Mark the polling page as readable
4781 void os::make_polling_page_readable(void) {
4782   if (mprotect((char *)_polling_page, page_size, PROT_READ) != 0) {
4783     fatal("Could not enable polling page");
4784   }
4785 }
4786 
4787 // OS interface.
4788 
4789 bool os::check_heap(bool force) { return true; }
4790 
4791 // Is a (classpath) directory empty?
4792 bool os::dir_is_empty(const char* path) {




4753   if (PerfAllowAtExitRegistration) {
4754     // only register atexit functions if PerfAllowAtExitRegistration is set.
4755     // atexit functions can be delayed until process exit time, which
4756     // can be problematic for embedded VM situations. Embedded VMs should
4757     // call DestroyJavaVM() to assure that VM resources are released.
4758 
4759     // note: perfMemory_exit_helper atexit function may be removed in
4760     // the future if the appropriate cleanup code can be added to the
4761     // VM_Exit VMOperation's doit method.
4762     if (atexit(perfMemory_exit_helper) != 0) {
4763       warning("os::init2 atexit(perfMemory_exit_helper) failed");
4764     }
4765   }
4766 
4767   // Init pset_loadavg function pointer
4768   init_pset_getloadavg_ptr();
4769 
4770   return JNI_OK;
4771 }
4772 
4773 void *os::alloc_memory_serialize_page() {
4774   address mem_serialize_page = (address)Solaris::mmap_chunk(NULL, page_size, MAP_PRIVATE, PROT_READ | PROT_WRITE);
4775   guarantee(mem_serialize_page != NULL, "mmap Failed for memory serialize page");
4776   return mem_serialize_page;
4777 }
4778 
4779 // Mark the polling page as unreadable
4780 void os::make_polling_page_unreadable(void) {
4781   if (mprotect((char *)_polling_page, page_size, PROT_NONE) != 0) {
4782     fatal("Could not disable polling page");
4783   }
4784 }
4785 
4786 // Mark the polling page as readable
4787 void os::make_polling_page_readable(void) {
4788   if (mprotect((char *)_polling_page, page_size, PROT_READ) != 0) {
4789     fatal("Could not enable polling page");
4790   }
4791 }
4792 
4793 // OS interface.
4794 
4795 bool os::check_heap(bool force) { return true; }
4796 
4797 // Is a (classpath) directory empty?
4798 bool os::dir_is_empty(const char* path) {


< prev index next >