Solved

C# 2.0 Get application currently used memory (kb)

Posted on 2008-10-01
2
1,482 Views
Last Modified: 2013-12-17
well question title says it all, how do i know from inside my app how much memory my app is using (i would want the number it says on task manager)..
0
Comment
Question by:eguilherme
2 Comments
 
LVL 5

Expert Comment

by:johnaryan
ID: 22615314
You can use the Performance Counters, these give you the neccessary info you need on many aspects of how your app is running in memory and usage of resources.
http://www.codeproject.com/KB/dotnet/perfcounter.aspx
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 22619414
there are several memory values allocated for a process, like:

long mem = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;

have a look for more properties at:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process_properties.aspx
 
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question