mirror of
https://github.com/ziglang/zig.git
synced 2026-01-06 21:43:25 +00:00
Merge remote-tracking branch 'origin/master' into llvm16
This commit is contained in:
commit
9f957184a1
@ -1164,7 +1164,8 @@ pub fn totalSystemMemory() TotalSystemMemoryError!usize {
|
||||
},
|
||||
.windows => {
|
||||
var kilobytes: std.os.windows.ULONGLONG = undefined;
|
||||
assert(std.os.windows.kernel32.GetPhysicallyInstalledSystemMemory(&kilobytes) == std.os.windows.TRUE);
|
||||
if (std.os.windows.kernel32.GetPhysicallyInstalledSystemMemory(&kilobytes) != std.os.windows.TRUE)
|
||||
return error.UnknownTotalSystemMemory;
|
||||
return kilobytes * 1024;
|
||||
},
|
||||
else => return error.UnknownTotalSystemMemory,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user