Job Talle
Job Talle

Reputation: 126

Get total number of RAM bytes on windows

I'm trying to get the total number of RAM bytes. I'm not certain about the validity of my results.

My computer has 8GB of RAM. The control panel calls this 8.00GB (7.88 GB usable).

Using the GetPhysicallyInstalledSystemMemory call multiplied by 1000, I get 8388608000 bytes (assuming the kilobyte Windows refers to has indeed 1000 bytes).

When I run wmic ComputerSystem get TotalPhysicalMemory, I get 8462008320 bytes.

When multiplying the call result by 1024 in case windows doesn't respect the conventions, I get 8589934592 bytes, which seems even less likely than the previous results.

In case it matters, I'm using two Crucial Ballistix Tactical BLT2C4G3D1608ET3LX0CEU memory modules advertized as 4GB per piece.

Upvotes: 0

Views: 834

Answers (1)

Job Talle
Job Talle

Reputation: 126

The result of GetPhysicallyInstalledSystemMemory multiplied by 1024 was the answer I was looking for. This is the total number of RAM bytes installed on the system.

Upvotes: 1

Related Questions