|
|
#1 |
|
Lively Member
Join Date: Feb 09
Posts: 113
![]() |
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?
|
|
|
|
|
|
#2 |
|
Lively Member
Join Date: Mar 10
Location: Southeast Michigan
Posts: 116
![]() |
Re: How to check available memory?
How about My.Computer.Info.AvailableVirtualMemory and My.Computer.Info.AvailablePhysicalMemory?
__________________
Dave Helpful information I've found here so far : The Definitive "Passing Data Between Forms" : Restrict TextBox to only certain characters, numeric or symbolic : .NET Regex Syntax (scripting) : .NET Regex Language Element : .NET Regex Class : Regular-Expressions.info Stuff I've learned here so far : Bing and Google are your friend. Trying to help others solve their problems is a great learning experience |
|
|
|
|
|
#3 | |
|
PowerPoster
Join Date: Jan 09
Location: USA
Posts: 2,404
![]() ![]() |
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 Why you shouldn't arbitrarily bump threads. Free 2010 Fluent Ribbon Control Suite (WPF) Quote:
|
|
|
|
|
|
|
#4 |
|
Lively Member
Join Date: Feb 09
Posts: 113
![]() |
Re: How to check available memory?
Dave, that worked fine. Thanks for the reference.
|
|
|
|
|
|
#5 | |
|
PowerPoster
Join Date: Jan 09
Location: USA
Posts: 2,404
![]() ![]() |
Re: How to check available memory?
__________________
CodeBank contributions: Process Manager Why you shouldn't arbitrarily bump threads. Free 2010 Fluent Ribbon Control Suite (WPF) Quote:
|
|
|
|
|
|
|
#6 |
|
Lively Member
Join Date: Feb 09
Posts: 113
![]() |
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 |
| memory |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|