mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-10 14:14:41 +00:00
add inactive_memory in Mac UMA
This commit is contained in:
parent
99d48157a0
commit
585864b05a
1 changed files with 1 additions and 2 deletions
|
@ -419,8 +419,7 @@ static uint64_t device_host_physical_memory(bool available) {
|
|||
size_t page_size = sysconf(_SC_PAGESIZE);
|
||||
|
||||
if (is_uma_arch()) { // Mac UMA with ARM64
|
||||
// memory = (vm_stats.free_count + vm_stats.inactive_count) * page_size;
|
||||
memory = vm_stats.free_count * page_size; // use "sudo purge" before launching
|
||||
memory = (vm_stats.free_count + vm_stats.inactive_count) * page_size;
|
||||
} else { // Mac with x86_64
|
||||
memory = total_memory - (vm_stats.internal_page_count - vm_stats.purgeable_count) * page_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue