Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 0b67279

Browse files
committed
fix: macos RAM info
1 parent 6ed42e0 commit 0b67279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

engine/utils/hardware/ram_info.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ inline Memory GetMemoryInfo() {
5858
&count) == KERN_SUCCESS) {
5959
used_memory =
6060
(vm_stat.active_count + vm_stat.inactive_count + vm_stat.wire_count) *
61-
page_size / 1024; // Convert to KB
61+
page_size;
6262
}
63-
return Memory{.total_MiB = total_memory / 1024,
64-
.available_MiB = (total_memory - used_memory) / 1024};
63+
return Memory{.total_MiB = ByteToMiB(total_memory),
64+
.available_MiB = ByteToMiB(total_memory - used_memory)};
6565
#elif defined(__linux__) || defined(_WIN32)
6666
return Memory{.total_MiB = ByteToMiB(m.total_Bytes()),
6767
.available_MiB = ByteToMiB(m.available_Bytes())};

0 commit comments

Comments
 (0)