Solved

C# 2.0 Get application currently used memory (kb)

Posted on 2008-10-01
2
1,489 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
[X]
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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
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.

624 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