mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 05:45:11 +02:00
Merge
This commit is contained in:
commit
48b6c6007f
2530 changed files with 113850 additions and 21998 deletions
|
@ -68,6 +68,7 @@
|
|||
#include "utilities/events.hpp"
|
||||
#include "utilities/elfFile.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/vmError.hpp"
|
||||
|
||||
// put OS-includes here
|
||||
|
@ -339,15 +340,13 @@ void os::init_system_properties_values() {
|
|||
// Base path of extensions installed on the system.
|
||||
#define SYS_EXT_DIR "/usr/java/packages"
|
||||
#define EXTENSIONS_DIR "/lib/ext"
|
||||
#define ENDORSED_DIR "/lib/endorsed"
|
||||
|
||||
// Buffer that fits several sprintfs.
|
||||
// Note that the space for the colon and the trailing null are provided
|
||||
// by the nulls included by the sizeof operator.
|
||||
const size_t bufsize =
|
||||
MAX3((size_t)MAXPATHLEN, // For dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR), // extensions dir
|
||||
(size_t)MAXPATHLEN + sizeof(ENDORSED_DIR)); // endorsed dir
|
||||
MAX2((size_t)MAXPATHLEN, // For dll_dir & friends.
|
||||
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
|
||||
char *buf = (char *)NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
|
||||
|
||||
// sysclasspath, java_home, dll_dir
|
||||
|
@ -405,23 +404,18 @@ void os::init_system_properties_values() {
|
|||
mtInternal);
|
||||
sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch);
|
||||
Arguments::set_library_path(ld_library_path);
|
||||
FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal);
|
||||
FREE_C_HEAP_ARRAY(char, ld_library_path);
|
||||
}
|
||||
|
||||
// Extensions directories.
|
||||
sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
|
||||
Arguments::set_ext_dirs(buf);
|
||||
|
||||
// Endorsed standards default directory.
|
||||
sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home());
|
||||
Arguments::set_endorsed_dirs(buf);
|
||||
|
||||
FREE_C_HEAP_ARRAY(char, buf, mtInternal);
|
||||
FREE_C_HEAP_ARRAY(char, buf);
|
||||
|
||||
#undef DEFAULT_LIBPATH
|
||||
#undef SYS_EXT_DIR
|
||||
#undef EXTENSIONS_DIR
|
||||
#undef ENDORSED_DIR
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1622,11 +1616,11 @@ bool os::dll_build_name(char* buffer, size_t buflen,
|
|||
// release the storage
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (pelements[i] != NULL) {
|
||||
FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal);
|
||||
FREE_C_HEAP_ARRAY(char, pelements[i]);
|
||||
}
|
||||
}
|
||||
if (pelements != NULL) {
|
||||
FREE_C_HEAP_ARRAY(char*, pelements, mtInternal);
|
||||
FREE_C_HEAP_ARRAY(char*, pelements);
|
||||
}
|
||||
} else {
|
||||
snprintf(buffer, buflen, "%s/lib%s.so", pname, fname);
|
||||
|
@ -2943,7 +2937,7 @@ void os::Linux::rebuild_cpu_to_node_map() {
|
|||
}
|
||||
}
|
||||
}
|
||||
FREE_C_HEAP_ARRAY(unsigned long, cpu_map, mtInternal);
|
||||
FREE_C_HEAP_ARRAY(unsigned long, cpu_map);
|
||||
}
|
||||
|
||||
int os::Linux::get_node_by_cpu(int cpu_id) {
|
||||
|
@ -3791,6 +3785,10 @@ size_t os::read(int fd, void *buf, unsigned int nBytes) {
|
|||
return ::read(fd, buf, nBytes);
|
||||
}
|
||||
|
||||
size_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
|
||||
return ::pread(fd, buf, nBytes, offset);
|
||||
}
|
||||
|
||||
// Short sleep, direct OS call.
|
||||
//
|
||||
// Note: certain versions of Linux CFS scheduler (since 2.6.23) do not guarantee
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue