Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,12 @@ public void run(CommandExecutor executor) {
// we should not see mlc > rss
if (jvm_nmt_mlc != -1) {
if (Platform.isDebugBuild()) {
if (proc_rss_all < jvm_nmt_mlc) {
throw new RuntimeException("NMT mlc higher than RSS?");
// Give a little slack for two reasons:
// - Not all allocated memory has to be in RSS, since some could be swapped out.
// - The peak RSS and peak malloc size are not taken at the exactly same time.
// Both should not lead to a large difference, so we allow a 25 percent deviation.
if (proc_rss_all * 1.25 <= jvm_nmt_mlc) {
throw new RuntimeException("NMT mlc more than 25 percent higher than RSS?");
}
}
}
Expand Down
Loading