Is there a way to know the current used memory in the current process?
I checked many questions: How to get the amount of memory used by an application
How to get memory available or used in C#
They are not available in .Net Standard 1.6.
Here you can check how it is done in HealthChecks project. You can use Process
class from System.Diagnostics
namespace.
* EDIT *
System.Diagnostics.Process Nuget package might need to be added.
Only xxxx64 memory properties are supported in .NET Standard (for example PrivateMemorySize64 and not PrivateMemorySize).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With