Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into llvm16
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Apr 6, 2023
2 parents 271f24f + 8853005 commit 9f95718
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/std/process.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9f95718

Please sign in to comment.