[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1494
  • Last Modified:

C# 2.0 Get application currently used memory (kb)

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
eguilherme
Asked:
eguilherme
1 Solution
 
johnaryanCommented:
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
 
Jaime OlivaresSoftware ArchitectCommented:
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now