mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-06 05:29:03 +00:00
fix device_physical_memory
This commit is contained in:
parent
4104eb5b7a
commit
2d79554694
1 changed files with 1 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue