File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/core/IronPython.Modules Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1401,17 +1401,18 @@ private struct SYSTEM_INFO {
14011401 internal short wProcessorRevision ;
14021402 }
14031403
1404+ [ SupportedOSPlatform ( "windows" ) ]
14041405 [ DllImport ( "kernel32" , SetLastError = true ) ]
14051406 private static extern void GetSystemInfo ( ref SYSTEM_INFO lpSystemInfo ) ;
14061407
14071408 private static int GetAllocationGranularity ( ) {
1408- try {
1409+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ) {
14091410 return GetAllocationGranularityWorker ( ) ;
1410- } catch {
1411- return System . Environment . SystemPageSize ;
14121411 }
1412+ return System . Environment . SystemPageSize ;
14131413 }
14141414
1415+ [ SupportedOSPlatform ( "windows" ) ]
14151416 [ MethodImpl ( MethodImplOptions . NoInlining ) ]
14161417 private static int GetAllocationGranularityWorker ( ) {
14171418 SYSTEM_INFO info = new SYSTEM_INFO ( ) ;
You can’t perform that action at this time.
0 commit comments