8198833: TestMemoryAwareness Docker container fails with too small maximum heap
authorrehn
Fri, 02 Mar 2018 11:43:19 +0100
changeset 49326 20ab04608e3f
parent 49325 8308de3f2573
child 49327 8f63fb7788bb
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 10:51:53 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);