< prev index next >

src/os/posix/vm/os_posix.cpp

Print this page
rev 10178 : imported patch 8145934


 302       if (is_allocatable(temp_limit)) {
 303         lower_limit = temp_limit;
 304       } else {
 305         upper_limit = temp_limit;
 306       }
 307     }
 308     *limit = lower_limit;
 309   }
 310   return true;
 311 #endif
 312 }
 313 
 314 const char* os::get_current_directory(char *buf, size_t buflen) {
 315   return getcwd(buf, buflen);
 316 }
 317 
 318 FILE* os::open(int fd, const char* mode) {
 319   return ::fdopen(fd, mode);
 320 }
 321 








 322 // Builds a platform dependent Agent_OnLoad_<lib_name> function name
 323 // which is used to find statically linked in agents.
 324 // Parameters:
 325 //            sym_name: Symbol in library we are looking for
 326 //            lib_name: Name of library to look in, NULL for shared libs.
 327 //            is_absolute_path == true if lib_name is absolute path to agent
 328 //                                     such as "/a/b/libL.so"
 329 //            == false if only the base name of the library is passed in
 330 //               such as "L"
 331 char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
 332                                     bool is_absolute_path) {
 333   char *agent_entry_name;
 334   size_t len;
 335   size_t name_len;
 336   size_t prefix_len = strlen(JNI_LIB_PREFIX);
 337   size_t suffix_len = strlen(JNI_LIB_SUFFIX);
 338   const char *start;
 339 
 340   if (lib_name != NULL) {
 341     len = name_len = strlen(lib_name);




 302       if (is_allocatable(temp_limit)) {
 303         lower_limit = temp_limit;
 304       } else {
 305         upper_limit = temp_limit;
 306       }
 307     }
 308     *limit = lower_limit;
 309   }
 310   return true;
 311 #endif
 312 }
 313 
 314 const char* os::get_current_directory(char *buf, size_t buflen) {
 315   return getcwd(buf, buflen);
 316 }
 317 
 318 FILE* os::open(int fd, const char* mode) {
 319   return ::fdopen(fd, mode);
 320 }
 321 
 322 void os::flockfile(FILE* fp) {
 323   ::flockfile(fp);
 324 }
 325 
 326 void os::funlockfile(FILE* fp) {
 327   ::funlockfile(fp);
 328 }
 329 
 330 // Builds a platform dependent Agent_OnLoad_<lib_name> function name
 331 // which is used to find statically linked in agents.
 332 // Parameters:
 333 //            sym_name: Symbol in library we are looking for
 334 //            lib_name: Name of library to look in, NULL for shared libs.
 335 //            is_absolute_path == true if lib_name is absolute path to agent
 336 //                                     such as "/a/b/libL.so"
 337 //            == false if only the base name of the library is passed in
 338 //               such as "L"
 339 char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
 340                                     bool is_absolute_path) {
 341   char *agent_entry_name;
 342   size_t len;
 343   size_t name_len;
 344   size_t prefix_len = strlen(JNI_LIB_PREFIX);
 345   size_t suffix_len = strlen(JNI_LIB_SUFFIX);
 346   const char *start;
 347 
 348   if (lib_name != NULL) {
 349     len = name_len = strlen(lib_name);


< prev index next >