# HG changeset patch # User rehn # Date 1519987399 -3600 # Node ID 20ab04608e3f35296b082e40f67c27b61fb8e13f # Parent 8308de3f257316c5e2469b726afa1e06d53ff2bd 8198833: TestMemoryAwareness Docker container fails with too small maximum heap Reviewed-by: bobv, dholmes diff -r 8308de3f2573 -r 20ab04608e3f 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);