|
-
Mar 16th, 2010, 07:11 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to check available memory?
I have a need to monitor available memory while my application is running, as a hard number and compared to available memory. How can I do this?
-
Mar 16th, 2010, 10:24 AM
#2
Addicted Member
Re: How to check available memory?
How about My.Computer.Info.AvailableVirtualMemory and My.Computer.Info.AvailablePhysicalMemory?
-
Mar 16th, 2010, 10:38 AM
#3
Re: How to check available memory?
And then use Math.Round to round it up and divide it by 1024 3 times to get GBs. This is assumnig every PC your application will interact with will have at least 1 GB memory. This is probably a safe assumption
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 16th, 2010, 01:02 PM
#4
Thread Starter
Hyperactive Member
Re: How to check available memory?
Dave, that worked fine. Thanks for the reference.
-
Mar 16th, 2010, 01:16 PM
#5
Re: How to check available memory?
 Originally Posted by HongKongCV
Dave, that worked fine. Thanks for the reference.
Yeah... That wasn't passive at all...
Did you do as I suggested so that you could get the size in a readable format? Or do you need to read it in bytes?
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 16th, 2010, 01:28 PM
#6
Thread Starter
Hyperactive Member
Re: [RESOLVED] How to check available memory?
No, the information isn't for display.
I have a multi-threaded application that is running into problems... I get an "out of memory" exception. So I needed a way to track the memory usages so I can see when and where it starts to spiral out of control.
In this instance, human readable in GB chunks is a drawback, not a benefit... more granularity in the raw numbers.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|