Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

C# 2.0 Get application currently used memory (kb)

Posted on 2008-10-01
2
1,484 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

861 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