You can use:
Process proc = Process.GetCurrentProcess();
To get the current process and use:
proc.PrivateMemorySize64;
To get the private memory usage. For more information look at this link.
More Related Contents:
- Memory leak in Data Access layer using enterprise library
- How to generator all combinations (memory efficient algorithm)?
- Setting Objects to Null/Nothing after use in .NET
- Does using “new” on a struct allocate it on the heap or stack?
- Attempted to read or write protected memory. This is often an indication that other memory is corrupt
- Implementing IDisposable correctly
- What strategies and tools are useful for finding memory leaks in .NET?
- Large Object Heap Fragmentation
- Is there any benefit of using an Object Initializer?
- ‘System.OutOfMemoryException’ was thrown when there is still plenty of memory free
- .NET Memory issues loading ~40 images, memory not reclaimed, potentially due to LOH fragmentation
- What is the correct Performance Counter to get CPU and Memory Usage of a Process?
- Are these objects’s references on the Stack or on the Heap?
- Fields of class, are they stored in the stack or heap?
- C# memory address and variable
- High memory consumption with Enumerable.Range?
- Why is 16 byte the recommended size for struct in C#?
- Why am I getting an Out Of Memory Exception in my C# application?
- How to calculate private working set (memory)?
- Initial capacity of collection types, e.g. Dictionary, List
- How is memory allocated for a static variable?
- Most efficient way to append arrays in C#?
- What causes memory fragmentation in .NET
- How are String and Char types stored in memory in .NET?
- How do I get .NET to garbage collect aggressively?
- Memory limitations in a 64-bit .Net application?
- Large Object Heap Compaction, when is it good?
- Call a stored procedure with parameter in c#
- how to handle spaces in file path if the folder contains the space?
- Export private/public keys from X509 certificate to PEM