changeset 49626:1d2cb50c1492

8198833: TestMemoryAwareness Docker container fails with too small maximum heap Reviewed-by: bobv, dholmes
author rehn
date Fri, 02 Mar 2018 11:43:19 +0100
parents ece10494786c
children 82a3005cb038
files src/hotspot/os/linux/os_linux.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);