From f4bb0fe332ea2b10a598dab79d90662bc6ee7e4a Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Fri, 2 Mar 2018 11:43:19 +0100 Subject: [PATCH] 8198833: TestMemoryAwareness Docker container fails with too small maximum heap Reviewed-by: bobv, dholmes --- src/hotspot/os/linux/os_linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp index 90217bd95ed..580c7ebcae5 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -203,7 +203,7 @@ julong os::physical_memory() { 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);