Skip to content
Permalink
Browse files

8247863: Unreachable code in OperatingSystemImpl.getTotalSwapSpaceSize()

After 8231111 we have -1 for missing metrics, thus the fix of 8236617 is obsolete

Reviewed-by: mbaesken
  • Loading branch information
jerboaa committed Jun 19, 2020
1 parent a4eaf95 commit 79f02a67cedcfd460a8ff252dcfaf1a38d743384
@@ -61,8 +61,7 @@ public long getTotalSwapSpaceSize() {
// it can use as much memory as the host's OS allows.
long memLimit = containerMetrics.getMemoryLimit();
if (limit >= 0 && memLimit >= 0) {
// we see a limit == 0 on some machines where "kernel does not support swap limit capabilities"
return (limit < memLimit) ? 0 : limit - memLimit;
return limit - memLimit; // might potentially be 0 for limit == memLimit
}
}
return getTotalSwapSpaceSize0();

0 comments on commit 79f02a6

Please sign in to comment.