# windows: replace GetPhysicallyInstalledSystemMemory with ntdll\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0733c8c5ca03f55fe8f65f74cea89dfccf6079b4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0733c8c5ca03f55fe8f65f74cea89dfccf6079b4

Requested commit: 0733c8c5ca03f55fe8f65f74cea89dfccf6079b4

Commit: 0733c8c5ca03f55fe8f65f74cea89dfccf6079b4

Tree: 1d941f7b9845f860304cfd4a9fd12be59e7b880a

Author: xEgoist

Committer: Andrew Kelley

## Message

```
windows: replace GetPhysicallyInstalledSystemMemory with ntdll.

`GetPhysicallyInstalledSystemMemory` uses SMBios to grab the physical
memory size which can lead to unecessary allocation and inacurate
representation of the total memory. Using `System_Basic_Information`
help to retrieve the physical memory which is not reserved for the
kernel/tables. This aligns better with the linux side as `/proc/meminfo`
does the same thing.

```

## Parents

- [7b908e173fa6034dc92e6b73c4264dc44706bd32](https://git.cafe/gitcafe/zig/commit/7b908e173fa6034dc92e6b73c4264dc44706bd32?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0733c8c5ca03f55fe8f65f74cea89dfccf6079b4?format=markdown)
