Skip to content

Commit

Permalink
fix: HI-32 Limit max iterations to a more reasonable number
Browse files Browse the repository at this point in the history
  • Loading branch information
L3tum committed Jan 22, 2022
1 parent 4a47b45 commit b69fcd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion HardwareInformation/Providers/IntelInformationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ private void GatherNumberOfPhysicalCores(ref MachineInformation information)
var ecx = 0u;
var apicIds = new Dictionary<uint, uint>();
var currentIteration = 0;
var maxIterations = int.MaxValue;

// Some high enough value. Theoretically right now the max configuration of physical cores for Intel
// is 56 Cores (or 112 Cores in 4x Socket Systems), so this leaves plenty of leeway.
var maxIterations = 256;

while (currentIteration < maxIterations)
{
Expand Down

0 comments on commit b69fcd2

Please sign in to comment.