Open Soap-141 opened 1 year ago
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process See info in area-owners.md if you want to be subscribed.
Author: | Soap-141 |
---|---|
Assignees: | - |
Labels: | `area-System.Diagnostics.Process` |
Milestone: | - |
@akoeplinger is there a native way that iOS supports working set? I thought process was largely unsupported out of the lack of fork abilities, but is introspection also not supported?
We're using proc_pidinfo
to get these details on macOS and unfortunately that API is not allowed by Apple on the iOS App Store so we had to remove it: https://github.com/dotnet/runtime/issues/61265
That said, there's nothing stopping you from using this API on your own e.g. behind a DEBUG flag that you never compile for a build that ends up on the App Store.
I'll take a quick look to see whether there is some allowed API that gives just the memory details though.
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.
Author: | Soap-141 |
---|---|
Assignees: | - |
Labels: | `area-System.Diagnostics.Process`, `os-ios` |
Milestone: | Future |
@akoeplinger Any updates?
Still no updates?
Description
For diagnostics and debugging purposes my team and I would like to have
Process.GetCurrentProcess().PrivateMemorySize64
working on iOS.See https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.getcurrentprocess?view=net-6.0 and https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.privatememorysize64?view=net-6.0 for more details.
Reproduction Steps
Use this code snippet on Xamarin or MAUI iOS.
Notice it's throwing exception.
Expected behavior
Should not throw any exception and work like it's supposed to.
Actual behavior
Throws an exception.
Regression?
No response
Known Workarounds
No response
Configuration
Other information
No response