473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Getting amount of total physical memory

Is there any _managed_ way of getting total physical
memory installed in the machine

Thanks in advanc
Michał Januszczyk
Jul 21 '05 #1
2 5027
Michal,

You can retrieve the amount of physical memory on the computer by using WMI.
A quick google search returned this page:

http://www.dotnet247.com/247referenc...24/123208.aspx

"Michal Januszczyk" <an*******@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
Is there any _managed_ way of getting total physical
memory installed in the machine ?

Thanks in advance
Michal Januszczyk

Jul 21 '05 #2

----- Eric Cherng wrote: ----

Michal

You can retrieve the amount of physical memory on the computer by using WMI
A quick google search returned this page

http://www.dotnet247.com/247referenc.../24/123208.asp
Thank You very much. This works fine on my machine, however I ran this on VMWare with 140 MB of memor
and this did not return valid numbers. Memory was returned twice (the program uses internally a loop):
it showed 50 MB and 33 MB, when it should return ony one number (140MB).
XP installed on the virtual machine (task manager, My Computer Properties,...) is aware of 140MB
Later I increased memory for VMachine to 240 MB, and then WMI returned 67MB (also twice

I hope that this is related to VMWare and all physicall machines would behave normally.

Thank You
Michal
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
2
by: Aravind | last post by:
Hi, I am ruuning to out of memory exception , My system has RAM of 4 GB and virtual memory paging size set to 4GB .When I check the memory occupied by the process during the exception , it is less...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
2
by: Michał Januszczyk | last post by:
Is there any _managed_ way of getting total physical memory installed in the machine Thanks in advanc Michał Januszczyk
1
by: murataykut | last post by:
Hi, I'm writing image processing program on BCB. But, for huge amount of memory allocation BCB doesn't works properly. I want to allocate nearly 2 GB (total) dynamic arrays. For 1,5 GB there is no...
5
by: Tenacious | last post by:
I am trying to shutdown a database server in the Application_End event handler on the Global.asax page. So far I am trying this only on the development server that comes with Visual Studio 2005....
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
12
by: miguelguerin | last post by:
Im having trouble getting the input from one file to another. Main file: package assigment3; /** * * @author mguer017 */ public class Main {
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.