src/hotspot/os/linux/os_linux.cpp
changeset 49195 1d2cb50c1492
parent 49193 c3ec048aad63
child 49349 7194eb9e8f19
child 56312 a52bcf4118eb
equal deleted inserted replaced
49194:ece10494786c 49195:1d2cb50c1492
   201   jlong phys_mem = 0;
   201   jlong phys_mem = 0;
   202   if (OSContainer::is_containerized()) {
   202   if (OSContainer::is_containerized()) {
   203     jlong mem_limit;
   203     jlong mem_limit;
   204     if ((mem_limit = OSContainer::memory_limit_in_bytes()) > 0) {
   204     if ((mem_limit = OSContainer::memory_limit_in_bytes()) > 0) {
   205       log_trace(os)("total container memory: " JLONG_FORMAT, mem_limit);
   205       log_trace(os)("total container memory: " JLONG_FORMAT, mem_limit);
   206       return phys_mem;
   206       return mem_limit;
   207     }
   207     }
   208     log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value",
   208     log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value",
   209                             mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit);
   209                             mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit);
   210   }
   210   }
   211 
   211