You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added AggressiveOptimization to methods involved in measuring allocations.
Warm up allocation measurement before taking actual measurement.
Moved a potential allocation offender to after the `GcStats.ReadFinal()` call.
Changed some `RuntimeInformation` properties to static readonly fields.
Removed enable monitoring in Engine (GcStats handles it).
if(RuntimeInformation.IsOldMono)// Monitoring is not available in Mono, see http://stackoverflow.com/questions/40234948/how-to-get-the-number-of-allocated-bytes-in-mono
// Many of these checks allocate and/or are expensive to compute. We store the results in static readonly fields to keep Engine non-allocating.
28
+
// Static readonly fields are used instead of properties to avoid an extra getter method call that might not be tier1 jitted.
29
+
// This class is internal, so we don't need to expose these as properties.
30
+
28
31
/// <summary>
29
32
/// returns true for both the old (implementation of .NET Framework) and new Mono (.NET 6+ flavour)
30
33
/// </summary>
31
-
publicstaticboolIsMono{get;}=Type.GetType("Mono.RuntimeStructs")!=null;// it allocates a lot of memory, we need to check it once in order to keep Engine non-allocating!
0 commit comments