Components of the user interface in Windows Vista report slightly different values for the total physical memory that is available on the computer

Components of the user interface in Windows Vista report slightly different values for the total physical memory that is available on the computer

Article ID : 935268
Last Review : February 14, 2008
Revision : 3.0

INTRODUCTION

The total physical memory on a computer is displayed in several components of the user interface (UI) in Windows Vista. Each component reports a slightly different value. This article discusses why different components report slightly different values. Additionally, this article identifies the component that shows the most accurate value. It also contains information about the application programming interface (API) that retrieves the most accurate value.

Important Windows Vista Service Pack 1 (SP1) made changes to the way components of the user interface report memory. For more information about how memory is reported in Windows Vista Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:

946003 (/Feedback.aspx?kbNumber=946003/) Windows Vista Service Pack 1 will report 4 GB of system memory (RAM) on systems that have 4 GB of memory installed

Back to the top

MORE INFORMATION

The components of the UI in Windows Vista that report the total physical memory on the computer include the following:

• The Welcome Center item in Control Panel
• The System item in Control Panel
• The Performance tab of Task Manager
• The View and print details page of the Performance Information and Tools item in Control Panel
• The Microsoft System Information (Msinfo32.exe) tool

Each component reports a slightly different amount of total RAM that is available on the computer. This behavior occurs because some components were designed to display a consumer-friendly amount of RAM. Additionally, each component was developed by different teams at different times for a particular purpose.

For example, you may experience the following scenario when you view the following components on a Windows Vista-based computer:

• The Welcome Center item in Control Panel reports 2.00 GB of RAM
• The System item in Control Panel reports 2046 MB of RAM
• The Performance tab of Task Manager reports 2045 MB of RAM
• The View and print details page of the Performance Information and Tools item in Control Panel reports 2.00 GB of RAM
• The System Information tool reports 2,045.54 MB of RAM

Of these components, the System Information tool reports the most accurate value for total physical memory.

How to use the API to obtain the total physical memory value

To retrieve the most accurate value that is under program control, developers should follow these steps:

1. Call the GlobalMemoryStatusEx function.
2. Query the ullAvailPhys member of the MEMORYSTATUSEX structure.

The components use either the GlobalMemoryStatusEx function or the same kernel technique that is used by the GlobalMemoryStatusEx function to calculate the total physical memory on a computer. To programmatically obtain this value, query the ullAvailPhys member of the MEMORYSTATUSEX structure passed as input to the GlobalMemoryStatusEx function.

The GlobalMemoryStatusEx function was not available at the time that some components were built. However, all components calculate the physical memory on the computer in the same manner. The only difference among the components is the rounding that occurs before the total physical memory is displayed in the UI.

Back to the top

REFERENCES

For more information about the GlobalMemoryStatusEx function, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/aa366589.aspx (http://msdn2.microsoft.com/en-us/library/aa366589.aspx)

For more information about the MEMORYSTATUSEX structure, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/aa366770.aspx (http://msdn2.microsoft.com/en-us/library/aa366770.aspx)

For more information about memory size reporting on Windows Vista-based computers that have 4 GB of RAM installed, click the following article number to view the article in the Microsoft Knowledge Base:

929605 (/Feedback.aspx?kbNumber=929605/) The system memory that is reported in the System Information dialog box in Windows Vista is less than you expect if 4 GB of RAM is installed

Back to the top


APPLIES TO
• Windows Vista Ultimate
• Windows Vista Enterprise
• Windows Vista Business
• Windows Vista Home Premium
• Windows Vista Home Basic
• Windows Vista Ultimate 64-bit Edition
• Windows Vista Enterprise 64-bit Edition
• Windows Vista Business 64-bit Edition
• Windows Vista Home Premium 64-bit Edition
• Windows Vista Home Basic 64-bit Edition
• Windows Vista Starter

Back to the top

Keywords: 
kbhowto kbinfo kbexpertisebeginner KB935268

Back to the top

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image