< prev index next > src/hotspot/os/solaris/os_solaris.cpp
Print this page
// by the nulls included by the sizeof operator.
const size_t bufsize =
MAX3((size_t)MAXPATHLEN, // For dll_dir & friends.
sizeof(SYS_EXT_DIR) + sizeof("/lib/"), // invariant ld_library_path
(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
{
char *pslash;
os::jvm_path(buf, bufsize);
// by the nulls included by the sizeof operator.
const size_t bufsize =
MAX3((size_t)MAXPATHLEN, // For dll_dir & friends.
sizeof(SYS_EXT_DIR) + sizeof("/lib/"), // invariant ld_library_path
(size_t)MAXPATHLEN + sizeof(EXTENSIONS_DIR) + sizeof(SYS_EXT_DIR) + sizeof(EXTENSIONS_DIR)); // extensions dir
! char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
// sysclasspath, java_home, dll_dir
{
char *pslash;
os::jvm_path(buf, bufsize);
// Struct size is more than sufficient for the path components obtained
// through the dlinfo() call, so only add additional space for the path
// components explicitly added here.
size_t library_path_size = info->dls_size + strlen(common_path);
! library_path = (char *)NEW_C_HEAP_ARRAY(char, library_path_size, mtInternal);
library_path[0] = '\0';
// Construct the desired Java library path from the linker's library
// search path.
//
// Struct size is more than sufficient for the path components obtained
// through the dlinfo() call, so only add additional space for the path
// components explicitly added here.
size_t library_path_size = info->dls_size + strlen(common_path);
! library_path = NEW_C_HEAP_ARRAY(char, library_path_size, mtInternal);
library_path[0] = '\0';
// Construct the desired Java library path from the linker's library
// search path.
//
< prev index next >