We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The call to GenSizeAfterMB in the GenFragmentationPercent call is what causes the null ref.
public double GenFragmentationPercent(Gens gen) { return GenFragmentationMB(gen) * 100.0 / GenSizeAfterMB(gen); }
That GenSizeAfterMB call fails if the HeapStats are somehow null:
public double GenSizeAfterMB(Gens gen) { return gen switch { Gens.GenPinObj => (double)HeapStats.GenerationSize4 / 1000000.0, Gens.GenLargeObj => (double)HeapStats.GenerationSize3 / 1000000.0, Gens.Gen2 => (double)HeapStats.GenerationSize2 / 1000000.0, Gens.Gen1 => (double)HeapStats.GenerationSize1 / 1000000.0, Gens.Gen0 => (double)HeapStats.GenerationSize0 / 1000000.0, _ => double.NaN, }; }
This should be guarded against.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The call to GenSizeAfterMB in the GenFragmentationPercent call is what causes the null ref.
That GenSizeAfterMB call fails if the HeapStats are somehow null:
This should be guarded against.
The text was updated successfully, but these errors were encountered: