| ... | ... | @@ -1164,7 +1164,8 @@ pub fn totalSystemMemory() TotalSystemMemoryError!usize { |
| 1164 | 1164 | }, |
| 1165 | 1165 | .windows => { |
| 1166 | 1166 | var kilobytes: std.os.windows.ULONGLONG = undefined; |
| 1167 | | assert(std.os.windows.kernel32.GetPhysicallyInstalledSystemMemory(&kilobytes) == std.os.windows.TRUE); |
| 1167 | if (std.os.windows.kernel32.GetPhysicallyInstalledSystemMemory(&kilobytes) != std.os.windows.TRUE) |
| 1168 | return error.UnknownTotalSystemMemory; |
| 1168 | 1169 | return kilobytes * 1024; |
| 1169 | 1170 | }, |
| 1170 | 1171 | else => return error.UnknownTotalSystemMemory, |