src/os/bsd/vm/os_bsd.cpp

Print this page




4672     *p = '\0';
4673   }
4674 
4675   // check xawt/libmawt.so
4676   strcpy(libmawtpath, buf);
4677   strcat(libmawtpath, xawtstr);
4678   if (::stat(libmawtpath, &statbuf) == 0) return false;
4679 
4680   // check libawt_xawt.so
4681   strcpy(libmawtpath, buf);
4682   strcat(libmawtpath, new_xawtstr);
4683   if (::stat(libmawtpath, &statbuf) == 0) return false;
4684 
4685   return true;
4686 #endif
4687 }
4688 
4689 // Get the default path to the core file
4690 // Returns the length of the string
4691 int os::get_core_path(char* buffer, size_t bufferSize) {
4692   int n = jio_snprintf(buffer, bufferSize, "/cores");
4693 
4694   // Truncate if theoretical string was longer than bufferSize
4695   n = MIN2(n, (int)bufferSize);
4696 
4697   return n;
4698 }
4699 
4700 #ifndef PRODUCT
4701 void TestReserveMemorySpecial_test() {
4702   // No tests available for this platform
4703 }
4704 #endif


4672     *p = '\0';
4673   }
4674 
4675   // check xawt/libmawt.so
4676   strcpy(libmawtpath, buf);
4677   strcat(libmawtpath, xawtstr);
4678   if (::stat(libmawtpath, &statbuf) == 0) return false;
4679 
4680   // check libawt_xawt.so
4681   strcpy(libmawtpath, buf);
4682   strcat(libmawtpath, new_xawtstr);
4683   if (::stat(libmawtpath, &statbuf) == 0) return false;
4684 
4685   return true;
4686 #endif
4687 }
4688 
4689 // Get the default path to the core file
4690 // Returns the length of the string
4691 int os::get_core_path(char* buffer, size_t bufferSize) {
4692   int n = jio_snprintf(buffer, bufferSize, "/cores/core or core.%d", current_process_id());
4693 
4694   // Truncate if theoretical string was longer than bufferSize
4695   n = MIN2(n, (int)bufferSize);
4696 
4697   return n;
4698 }
4699 
4700 #ifndef PRODUCT
4701 void TestReserveMemorySpecial_test() {
4702   // No tests available for this platform
4703 }
4704 #endif