< prev index next >

src/os/posix/vm/os_posix.cpp

Print this page
rev 10661 : [mq]: 8145934


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








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




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


< prev index next >