fix device_physical_memory

This commit is contained in:
Zonghang Li 2024-12-09 14:42:49 +04:00
parent 4104eb5b7a
commit 2d79554694

View file

@ -573,12 +573,7 @@ static uint64_t device_cgroup_physical_memory(bool available) {
uint64_t device_physical_memory(bool available) {
if (device_is_docker_container()) {
uint64_t memory_total = device_cgroup_physical_memory(false);
if (available) {
uint64_t memory_usage = device_cgroup_physical_memory(true);
return memory_total - memory_usage;
}
return memory_total;
return device_cgroup_physical_memory(available);
} else {
return device_host_physical_memory(available);
}