mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8376302: os::Machine::used_memory reports container used memory when running containerized
Reviewed-by: eosterlund, sgehwolf
This commit is contained in:
parent
5990165d82
commit
528bbe7919
@ -2211,8 +2211,8 @@ bool os::used_memory(physical_memory_size_type& value) {
|
||||
bool os::Machine::used_memory(physical_memory_size_type& value) {
|
||||
physical_memory_size_type avail_mem = 0;
|
||||
// Return value ignored - defaulting to 0 on failure.
|
||||
(void)os::available_memory(avail_mem);
|
||||
physical_memory_size_type phys_mem = os::physical_memory();
|
||||
(void)os::Machine::available_memory(avail_mem);
|
||||
physical_memory_size_type phys_mem = os::Machine::physical_memory();
|
||||
value = phys_mem - avail_mem;
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user