< prev index next >

src/os/linux/vm/os_linux.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.

*** 3747,3763 **** // Does this overlap the block we wanted? Give back the overlapped // parts and try again. size_t top_overlap = requested_addr + (bytes + gap) - base[i]; ! if (top_overlap >= 0 && top_overlap < bytes) { unmap_memory(base[i], top_overlap); base[i] += top_overlap; size[i] = bytes - top_overlap; } else { size_t bottom_overlap = base[i] + bytes - requested_addr; ! if (bottom_overlap >= 0 && bottom_overlap < bytes) { unmap_memory(requested_addr, bottom_overlap); size[i] = bytes - bottom_overlap; } else { size[i] = bytes; } --- 3747,3763 ---- // Does this overlap the block we wanted? Give back the overlapped // parts and try again. size_t top_overlap = requested_addr + (bytes + gap) - base[i]; ! if (top_overlap < bytes) { unmap_memory(base[i], top_overlap); base[i] += top_overlap; size[i] = bytes - top_overlap; } else { size_t bottom_overlap = base[i] + bytes - requested_addr; ! if (bottom_overlap < bytes) { unmap_memory(requested_addr, bottom_overlap); size[i] = bytes - bottom_overlap; } else { size[i] = bytes; }
*** 6043,6054 **** } else { written = jio_snprintf(buffer, bufferSize, "%s/%s", p, core_pattern); } } ! if ((written >= 0) && (written < bufferSize) ! && (pid_pos == NULL) && (core_pattern[0] != '|')) { int core_uses_pid_file = ::open("/proc/sys/kernel/core_uses_pid", O_RDONLY); if (core_uses_pid_file != -1) { char core_uses_pid = 0; ssize_t ret = ::read(core_uses_pid_file, &core_uses_pid, 1); --- 6043,6053 ---- } else { written = jio_snprintf(buffer, bufferSize, "%s/%s", p, core_pattern); } } ! if ((written < bufferSize) && (pid_pos == NULL) && (core_pattern[0] != '|')) { int core_uses_pid_file = ::open("/proc/sys/kernel/core_uses_pid", O_RDONLY); if (core_uses_pid_file != -1) { char core_uses_pid = 0; ssize_t ret = ::read(core_uses_pid_file, &core_uses_pid, 1);
< prev index next >