Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSInformation not querying the underlying OS runtime is simply not good enough. #17126

Closed
redknightlois opened this issue Apr 26, 2016 · 2 comments
Assignees
Milestone

Comments

@redknightlois
Copy link

Here is a real example of use why build time OS Information without the real runtime is not a good idea.

See discussions here:

I code for a managed NoSQL database and for us performance is a must; therefore in some cases we have to do some platform specific stuff like calling PrefetchVirtualMemory. The problem is that the function is not supported on any OS, it is only supported in Windows 8+.

While this may look like an isolated example, not even in windows (which is very stable) the runtime is changing and underlying APIs are not set in stone. Knowing that, think about newer platforms like Android where versions numbers would mean something is viable or not.

Not having a cross-platform way to query the runtime is a no-no for performance and support OS that are not mature enough to absolutely not require having specific dedicated codepath depending on the runtime.

EDIT: I know I can still get it with a Win32 call now I know that I am on windows, but that is not the point.

@Priya91
Copy link
Contributor

Priya91 commented Apr 26, 2016

@redknightlois Have you looked at RuntimeInformation.OSDescription API, it basically gives output from uname on Unix and RtlGetVersion on Windows.

@redknightlois
Copy link
Author

Now I get why I couldnt find it. It is not in the RC1-update2 build. Closed.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-rtm milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants