Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix GCToOSInterface::GetProcessorForHeap too
The loop was scanning only bits below the total processor count
  • Loading branch information
janvorli committed Nov 22, 2019
commit f86d8e4187bd55bd77468d225026feb75a5d38f7
2 changes: 1 addition & 1 deletion src/coreclr/src/gc/unix/gcenv.unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ bool GCToOSInterface::GetProcessorForHeap(uint16_t heap_number, uint16_t* proc_n
bool success = false;

uint16_t availableProcNumber = 0;
for (size_t procNumber = 0; procNumber < g_totalCpuCount; procNumber++)
for (size_t procNumber = 0; procNumber < MAX_SUPPORTED_CPUS; procNumber++)
{
if (g_processAffinitySet.Contains(procNumber))
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/gcenv.os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ bool GCToOSInterface::GetProcessorForHeap(uint16_t heap_number, uint16_t* proc_n
// Locate heap_number-th available processor
uint16_t procIndex;
size_t cnt = heap_number;
for (uint16_t i = 0; i < GCToOSInterface::GetTotalProcessorCount(); i++)
for (uint16_t i = 0; i < MAX_SUPPORTED_CPUS; i++)
{
if (g_processAffinitySet.Contains(i))
{
Expand Down