Bug 2049 - (ENH) Query the number of hardware CPU for Environment.ProcessorCount on Android
Summary: (ENH) Query the number of hardware CPU for Environment.ProcessorCount on Android
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 2.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-11-16 09:05 UTC by Jérémie Laval
Modified: 2011-11-17 12:08 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Patch for mono_cpu_count (943 bytes, patch)
2011-11-16 09:06 UTC, Jérémie Laval
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jérémie Laval 2011-11-16 09:05:24 UTC
Attached patch implement ProcessorCount based on /sys entries to get the proper hardware of CPU. Android has a bad habit of shutting down CPU to save power and mess the rest of the world with that fact.
Comment 1 Jérémie Laval 2011-11-16 09:06:03 UTC
Created attachment 894 [details]
Patch for mono_cpu_count
Comment 2 Gonzalo Paniagua Javier 2011-11-17 11:25:41 UTC
Hi Jeremie.

I don't see any call to fclose(present)
Comment 3 Jérémie Laval 2011-11-17 12:08:48 UTC
Hey Gonzalo,

Yes, Rodrigo reported issues including this one which have been addressed in https://github.com/mono/mono/commit/06af78a76afd8cb6ded4db622649a25277e7f624