Solved

C# 2.0 Get application currently used memory (kb)

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now