diff options
author | Sean Gillespie <segilles@microsoft.com> | 2017-06-01 10:17:35 -0700 |
---|---|---|
committer | Sean Gillespie <segilles@microsoft.com> | 2017-06-01 10:22:06 -0700 |
commit | 77eb339752afa774655d88121f4d8f5de05f6d0a (patch) | |
tree | c5c7d5e383cda13e29accbb86d620d69749973e7 /src/gc/windows | |
parent | 0834425813497593ceda8bb0ae12dcc463011d7c (diff) | |
download | coreclr-77eb339752afa774655d88121f4d8f5de05f6d0a.tar.gz coreclr-77eb339752afa774655d88121f4d8f5de05f6d0a.tar.bz2 coreclr-77eb339752afa774655d88121f4d8f5de05f6d0a.zip |
[Local GC] Remove uses of g_SystemInfo from the GC (#11628)
* [Local GC] Don't use g_SystemInfo to infer the number of processors
* [Local GC] Avoid using g_SystemInfo.dwAllocationGranularity from within
the GC.
In a few places, the GC aligns the size of a request memory reservation
to the allocation granularity before calling
GCToOSInterface::VirtualReserve. Upon inspection, this isn't necessary.
* [Local GC] Remove uses of g_SystemInfo from the handle table
* Add new API on GCToOSInterface for querying the total number of procs on the machine
Diffstat (limited to 'src/gc/windows')
-rw-r--r-- | src/gc/windows/gcenv.windows.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gc/windows/gcenv.windows.cpp b/src/gc/windows/gcenv.windows.cpp index 3749f06a68..c543b0413a 100644 --- a/src/gc/windows/gcenv.windows.cpp +++ b/src/gc/windows/gcenv.windows.cpp @@ -603,6 +603,15 @@ bool GCToOSInterface::CreateThread(GCThreadFunction function, void* param, GCThr return true; } +// Gets the total number of processors on the machine, not taking +// into account current process affinity. +// Return: +// Number of processors on the machine +uint32_t GCToOSInterface::GetTotalProcessorCount() +{ + return g_SystemInfo.dwNumberOfProcessors; +} + // Initialize the critical section void CLRCriticalSection::Initialize() { |