src/os/solaris/vm/os_solaris.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-rt.8007074 Sdiff src/os/solaris/vm

src/os/solaris/vm/os_solaris.cpp

Print this page




3368 
3369     UseLargePages = Solaris::mpss_sanity_check(warn_on_failure, &_large_page_size);
3370   }
3371 }
3372 
3373 bool os::Solaris::setup_large_pages(caddr_t start, size_t bytes, size_t align) {
3374   // Signal to OS that we want large pages for addresses
3375   // from addr, addr + bytes
3376   struct memcntl_mha mpss_struct;
3377   mpss_struct.mha_cmd = MHA_MAPSIZE_VA;
3378   mpss_struct.mha_pagesize = align;
3379   mpss_struct.mha_flags = 0;
3380   // Upon successful completion, memcntl() returns 0
3381   if (memcntl(start, bytes, MC_HAT_ADVISE, (caddr_t) &mpss_struct, 0, 0)) {
3382     debug_only(warning("Attempt to use MPSS failed."));
3383     return false;
3384   }
3385   return true;
3386 }
3387 
3388 char* os::reserve_memory_special(size_t size, char* addr, bool exec) {
3389   fatal("os::reserve_memory_special should not be called on Solaris.");
3390   return NULL;
3391 }
3392 
3393 bool os::release_memory_special(char* base, size_t bytes) {
3394   fatal("os::release_memory_special should not be called on Solaris.");
3395   return false;
3396 }
3397 
3398 size_t os::large_page_size() {
3399   return _large_page_size;
3400 }
3401 
3402 // MPSS allows application to commit large page memory on demand; with ISM
3403 // the entire memory region must be allocated as shared memory.
3404 bool os::can_commit_large_page_memory() {
3405   return true;
3406 }
3407 
3408 bool os::can_execute_large_page_memory() {


6584   return (ret == OS_ERR) ? 0 : 1;
6585 }
6586 
6587 int os::bind(int fd, struct sockaddr* him, socklen_t len) {
6588    INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),\
6589                                       os::Solaris::clear_interrupted);
6590 }
6591 
6592 // Get the default path to the core file
6593 // Returns the length of the string
6594 int os::get_core_path(char* buffer, size_t bufferSize) {
6595   const char* p = get_current_directory(buffer, bufferSize);
6596 
6597   if (p == NULL) {
6598     assert(p != NULL, "failed to get current directory");
6599     return 0;
6600   }
6601 
6602   return strlen(buffer);
6603 }








3368 
3369     UseLargePages = Solaris::mpss_sanity_check(warn_on_failure, &_large_page_size);
3370   }
3371 }
3372 
3373 bool os::Solaris::setup_large_pages(caddr_t start, size_t bytes, size_t align) {
3374   // Signal to OS that we want large pages for addresses
3375   // from addr, addr + bytes
3376   struct memcntl_mha mpss_struct;
3377   mpss_struct.mha_cmd = MHA_MAPSIZE_VA;
3378   mpss_struct.mha_pagesize = align;
3379   mpss_struct.mha_flags = 0;
3380   // Upon successful completion, memcntl() returns 0
3381   if (memcntl(start, bytes, MC_HAT_ADVISE, (caddr_t) &mpss_struct, 0, 0)) {
3382     debug_only(warning("Attempt to use MPSS failed."));
3383     return false;
3384   }
3385   return true;
3386 }
3387 
3388 char* os::reserve_memory_special(size_t size, size_t alignment, char* addr, bool exec) {
3389   fatal("os::reserve_memory_special should not be called on Solaris.");
3390   return NULL;
3391 }
3392 
3393 bool os::release_memory_special(char* base, size_t bytes) {
3394   fatal("os::release_memory_special should not be called on Solaris.");
3395   return false;
3396 }
3397 
3398 size_t os::large_page_size() {
3399   return _large_page_size;
3400 }
3401 
3402 // MPSS allows application to commit large page memory on demand; with ISM
3403 // the entire memory region must be allocated as shared memory.
3404 bool os::can_commit_large_page_memory() {
3405   return true;
3406 }
3407 
3408 bool os::can_execute_large_page_memory() {


6584   return (ret == OS_ERR) ? 0 : 1;
6585 }
6586 
6587 int os::bind(int fd, struct sockaddr* him, socklen_t len) {
6588    INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),\
6589                                       os::Solaris::clear_interrupted);
6590 }
6591 
6592 // Get the default path to the core file
6593 // Returns the length of the string
6594 int os::get_core_path(char* buffer, size_t bufferSize) {
6595   const char* p = get_current_directory(buffer, bufferSize);
6596 
6597   if (p == NULL) {
6598     assert(p != NULL, "failed to get current directory");
6599     return 0;
6600   }
6601 
6602   return strlen(buffer);
6603 }
6604 
6605 #ifndef PRODUCT
6606 void TestReserveMemorySpecial_test() {
6607   // No tests available for this platform
6608 }
6609 #endif
src/os/solaris/vm/os_solaris.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File