8198833: TestMemoryAwareness Docker container fails with too small maximum heap
authorrehn
Fri, 02 Mar 2018 11:43:19 +0100
changeset 49195 1d2cb50c1492
parent 49194 ece10494786c
child 49196 82a3005cb038
8198833: TestMemoryAwareness Docker container fails with too small maximum heap Reviewed-by: bobv, dholmes
src/hotspot/os/linux/os_linux.cpp
--- a/src/hotspot/os/linux/os_linux.cpp	Fri Mar 02 21:00:12 2018 +0100
+++ b/src/hotspot/os/linux/os_linux.cpp	Fri Mar 02 11:43:19 2018 +0100
@@ -203,7 +203,7 @@
     jlong mem_limit;
     if ((mem_limit = OSContainer::memory_limit_in_bytes()) > 0) {
       log_trace(os)("total container memory: " JLONG_FORMAT, mem_limit);
-      return phys_mem;
+      return mem_limit;
     }
     log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value",
                             mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit);