< prev index next >
src/os/linux/vm/os_linux.cpp
Print this page
*** 2678,2688 ****
assert(mesg != NULL, "mesg must be specified");
int err = os::Linux::commit_memory_impl(addr, size, exec);
if (err != 0) {
// the caller wants all commit errors to exit with the specified mesg:
warn_fail_commit_memory(addr, size, exec, err);
! vm_exit_out_of_memory(size, OOM_MMAP_ERROR, mesg);
}
}
// Define MAP_HUGETLB here so we can build HotSpot on old systems.
#ifndef MAP_HUGETLB
--- 2678,2688 ----
assert(mesg != NULL, "mesg must be specified");
int err = os::Linux::commit_memory_impl(addr, size, exec);
if (err != 0) {
// the caller wants all commit errors to exit with the specified mesg:
warn_fail_commit_memory(addr, size, exec, err);
! vm_exit_out_of_memory(size, OOM_MMAP_ERROR, "%s", mesg);
}
}
// Define MAP_HUGETLB here so we can build HotSpot on old systems.
#ifndef MAP_HUGETLB
*** 2714,2724 ****
assert(mesg != NULL, "mesg must be specified");
int err = os::Linux::commit_memory_impl(addr, size, alignment_hint, exec);
if (err != 0) {
// the caller wants all commit errors to exit with the specified mesg:
warn_fail_commit_memory(addr, size, alignment_hint, exec, err);
! vm_exit_out_of_memory(size, OOM_MMAP_ERROR, mesg);
}
}
void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
if (UseTransparentHugePages && alignment_hint > (size_t)vm_page_size()) {
--- 2714,2724 ----
assert(mesg != NULL, "mesg must be specified");
int err = os::Linux::commit_memory_impl(addr, size, alignment_hint, exec);
if (err != 0) {
// the caller wants all commit errors to exit with the specified mesg:
warn_fail_commit_memory(addr, size, alignment_hint, exec, err);
! vm_exit_out_of_memory(size, OOM_MMAP_ERROR, "%s", mesg);
}
}
void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
if (UseTransparentHugePages && alignment_hint > (size_t)vm_page_size()) {
*** 4276,4287 ****
// save the old handler in jvm
save_preinstalled_handler(sig, oldAct);
// libjsig also interposes the sigaction() call below and saves the
// old sigaction on it own.
} else {
! fatal(err_msg("Encountered unexpected pre-existing sigaction handler "
! "%#lx for signal %d.", (long)oldhand, sig));
}
}
struct sigaction sigAct;
sigfillset(&(sigAct.sa_mask));
--- 4276,4287 ----
// save the old handler in jvm
save_preinstalled_handler(sig, oldAct);
// libjsig also interposes the sigaction() call below and saves the
// old sigaction on it own.
} else {
! fatal("Encountered unexpected pre-existing sigaction handler "
! "%#lx for signal %d.", (long)oldhand, sig);
}
}
struct sigaction sigAct;
sigfillset(&(sigAct.sa_mask));
*** 4609,4620 ****
ThreadCritical::initialize();
Linux::set_page_size(sysconf(_SC_PAGESIZE));
if (Linux::page_size() == -1) {
! fatal(err_msg("os_linux.cpp: os::init: sysconf failed (%s)",
! strerror(errno)));
}
init_page_sizes((size_t) Linux::page_size());
Linux::initialize_system_info();
--- 4609,4620 ----
ThreadCritical::initialize();
Linux::set_page_size(sysconf(_SC_PAGESIZE));
if (Linux::page_size() == -1) {
! fatal("os_linux.cpp: os::init: sysconf failed (%s)",
! strerror(errno));
}
init_page_sizes((size_t) Linux::page_size());
Linux::initialize_system_info();
*** 4626,4645 ****
// pthread_condattr initialization for monotonic clock
int status;
pthread_condattr_t* _condattr = os::Linux::condAttr();
if ((status = pthread_condattr_init(_condattr)) != 0) {
! fatal(err_msg("pthread_condattr_init: %s", strerror(status)));
}
// Only set the clock if CLOCK_MONOTONIC is available
if (os::supports_monotonic_clock()) {
if ((status = pthread_condattr_setclock(_condattr, CLOCK_MONOTONIC)) != 0) {
if (status == EINVAL) {
warning("Unable to use monotonic clock with relative timed-waits" \
" - changes to the time-of-day clock may have adverse affects");
} else {
! fatal(err_msg("pthread_condattr_setclock: %s", strerror(status)));
}
}
}
// else it defaults to CLOCK_REALTIME
--- 4626,4645 ----
// pthread_condattr initialization for monotonic clock
int status;
pthread_condattr_t* _condattr = os::Linux::condAttr();
if ((status = pthread_condattr_init(_condattr)) != 0) {
! fatal("pthread_condattr_init: %s", strerror(status));
}
// Only set the clock if CLOCK_MONOTONIC is available
if (os::supports_monotonic_clock()) {
if ((status = pthread_condattr_setclock(_condattr, CLOCK_MONOTONIC)) != 0) {
if (status == EINVAL) {
warning("Unable to use monotonic clock with relative timed-waits" \
" - changes to the time-of-day clock may have adverse affects");
} else {
! fatal("pthread_condattr_setclock: %s", strerror(status));
}
}
}
// else it defaults to CLOCK_REALTIME
< prev index next >