1633 references to GC
AnalyzerRunner (3)
Aspire.Cli.Tests (2)
Client.TypedClient.IntegrationTests (3)
csc (1)
dotnet-svcutil-lib (6)
HealthChecksSample (4)
HttpStress (1)
IdeCoreBenchmarks (4)
Interop.FunctionalTests (1)
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
Microsoft.AspNetCore.Cryptography.Internal.Tests (2)
Microsoft.AspNetCore.Http.Microbenchmarks (14)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.Mvc.Core.Test (2)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.Routing.Microbenchmarks (15)
Microsoft.AspNetCore.Routing.Tests (4)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.SignalR.Client.Tests (2)
Microsoft.AspNetCore.SpaProxy (1)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
Microsoft.Cci.Extensions (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (62)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Features (16)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.UnitTests (11)
Microsoft.CodeAnalysis.Workspaces (13)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Microsoft.Data.Analysis (1)
Microsoft.Data.Analysis.Tests (2)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.DataIngestion.Abstractions (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Identity.Core (2)
Microsoft.Extensions.ObjectPool (1)
Microsoft.Extensions.TimeProvider.Testing (2)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Gen.Metrics.Generated.Tests (1)
Microsoft.Maui (1)
Microsoft.McpServer.ProjectTemplates.Tests (1)
Microsoft.ML.AutoML (2)
Microsoft.ML.Core (2)
Microsoft.ML.Data (1)
Microsoft.ML.DataView (1)
Microsoft.ML.FastTree (3)
Microsoft.ML.OnnxTransformer (1)
Microsoft.ML.Parquet (1)
Microsoft.ML.Recommender (1)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.TestFramework (1)
Microsoft.ML.Tokenizers.Tests (2)
Microsoft.ML.TorchSharp (3)
Microsoft.VisualBasic.Core (1)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (2)
Microsoft.VisualStudio.IntegrationTestService (1)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
Microsoft.VisualStudio.LanguageServices.Implementation (1)
mscorlib (1)
netstandard (1)
PresentationBuildTasks (1)
PresentationCore (58)
PresentationCore.Tests (4)
PresentationFramework (66)
PresentationUI (5)
ReachFramework (9)
Roslyn.Test.PdbUtilities (1)
Roslyn.VisualStudio.DiagnosticsWindow (3)
Roslyn.VisualStudio.Next.UnitTests (1)
ScenarioTests.Common.Tests (1)
System.CodeDom (1)
System.Collections.Concurrent (1)
System.Collections.Immutable (1)
System.ComponentModel.Composition (8)
System.ComponentModel.EventBasedAsync (1)
System.ComponentModel.Primitives (1)
System.ComponentModel.TypeConverter (6)
System.Configuration.ConfigurationManager (1)
System.Data.Common (10)
System.Data.Odbc (7)
System.Diagnostics.DiagnosticSource (13)
System.Diagnostics.Process (3)
System.Diagnostics.TraceSource (5)
System.DirectoryServices.Protocols (4)
System.Drawing.Common (500)
System.Drawing.Common.Tests (2)
System.IO.Compression (2)
System.IO.IsolatedStorage (1)
System.IO.MemoryMappedFiles (2)
System.IO.Packaging (2)
System.IO.Pipes (1)
System.Linq (2)
System.Memory (1)
System.Net.Http (9)
System.Net.HttpListener (1)
System.Net.Mail (1)
System.Net.Ping (1)
System.Net.Quic (1)
System.Net.Requests (1)
System.Net.Security (8)
System.Net.Sockets (5)
System.Net.WebClient (1)
System.Numerics.Tensors (3)
System.Private.CoreLib (238)
LibraryImports.g.cs (6)
469private static extern partial void AllocateNewArray(nint typeHandlePtr, int length, global::System.GC.GC_ALLOC_FLAGS flags, global::System.Runtime.CompilerServices.ObjectHandleOnStack ret);
585private static unsafe extern partial global::System.GC.EnableNoGCRegionCallbackStatus _EnableNoGCRegionCallback(global::System.GC.NoGCRegionCallbackFinalizerWorkItem* callback, long totalSize);
601internal static unsafe extern partial void _EnumerateConfigurationValues(void* configurationDictionary, delegate* unmanaged<void*, byte*, byte*, global::System.GC.GCConfigurationType, long, void> callback);
609internal static extern partial int _RefreshMemoryLimit(global::System.GC.GCHeapHardLimitInfo heapHardLimitInfo);
5060global::System.GC.KeepAlive(result);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (15)
81_gcHeapSizeCounter ??= new PollingCounter("gc-heap-size", this, () => ((double)GC.GetTotalMemory(false) / 1_000_000)) { DisplayName = "GC Heap Size", DisplayUnits = "MB" };
82_gen0GCCounter ??= new IncrementingPollingCounter("gen-0-gc-count", this, () => GC.CollectionCount(0)) { DisplayName = "Gen 0 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) };
83_gen1GCCounter ??= new IncrementingPollingCounter("gen-1-gc-count", this, () => GC.CollectionCount(1)) { DisplayName = "Gen 1 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) };
84_gen2GCCounter ??= new IncrementingPollingCounter("gen-2-gc-count", this, () => GC.CollectionCount(2)) { DisplayName = "Gen 2 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) };
85_gen0BudgetCounter ??= new PollingCounter("gen-0-gc-budget", this, () => GC.GetGenerationBudget(0) / 1_000_000) { DisplayName = "Gen 0 GC Budget", DisplayUnits = "MB" };
90_allocRateCounter ??= new IncrementingPollingCounter("alloc-rate", this, () => GC.GetTotalAllocatedBytes()) { DisplayName = "Allocation Rate", DisplayUnits = "B", DisplayRateTimeScale = new TimeSpan(0, 0, 1) };
93var gcInfo = GC.GetGCMemoryInfo();
97_committedCounter ??= new PollingCounter("gc-committed", this, () => ((double)GC.GetGCMemoryInfo().TotalCommittedBytes / 1_000_000)) { DisplayName = "GC Committed Bytes", DisplayUnits = "MB" };
99_gcTimeCounter ??= new PollingCounter("time-in-gc", this, () => GC.GetLastGCPercentTimeInGC()) { DisplayName = "% Time in GC since last GC", DisplayUnits = "%" };
100_totalGcPauseTimeCounter ??= new IncrementingPollingCounter("total-pause-time-by-gc", this, () => GC.GetTotalPauseDuration().TotalMilliseconds) { DisplayName = "Time paused by GC", DisplayUnits = "ms" };
101_gen0SizeCounter ??= new PollingCounter("gen-0-size", this, () => GC.GetGenerationSize(0)) { DisplayName = "Gen 0 Size", DisplayUnits = "B" };
102_gen1SizeCounter ??= new PollingCounter("gen-1-size", this, () => GC.GetGenerationSize(1)) { DisplayName = "Gen 1 Size", DisplayUnits = "B" };
103_gen2SizeCounter ??= new PollingCounter("gen-2-size", this, () => GC.GetGenerationSize(2)) { DisplayName = "Gen 2 Size", DisplayUnits = "B" };
104_lohSizeCounter ??= new PollingCounter("loh-size", this, () => GC.GetGenerationSize(3)) { DisplayName = "LOH Size", DisplayUnits = "B" };
105_pohSizeCounter ??= new PollingCounter("poh-size", this, () => GC.GetGenerationSize(4)) { DisplayName = "POH (Pinned Object Heap) Size", DisplayUnits = "B" };
System.Private.DataContractSerialization (2)
System.Private.Windows.Core (54)
System.Private.Windows.Core.Tests (3)
System.Private.Windows.Core.TestUtilities (8)
System.Private.Windows.GdiPlus (10)
System.Private.Xml (2)
System.Reflection.Metadata (3)
System.Reflection.MetadataLoadContext (1)
System.Runtime (1)
System.Runtime.Caching (10)
System.Runtime.InteropServices (5)
System.Security.Cryptography (31)
System.Security.Cryptography.Cose (1)
System.Security.Cryptography.Pkcs (1)
System.ServiceModel.Primitives (3)
System.Threading (2)
System.Threading.RateLimiting (5)
System.Threading.Tasks.Dataflow (2)
System.Transactions.Local (1)
System.Windows.Controls.Ribbon (1)
System.Windows.Forms (66)
System.Windows.Forms.Design (2)
System.Windows.Forms.Primitives (84)
System.Windows.Forms.Primitives.TestUtilities (2)
System.Windows.Forms.Tests (23)
System.Windows.Forms.UI.IntegrationTests (1)
System.Xaml (5)
UIAutomationClient (7)
UIAutomationTypes (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (1)
119GC.Collect();
vbc (1)
VBCSCompiler (2)
VBCSCompiler.UnitTests (2)
Wasm.Performance.TestApp (1)
WinFormsControlsTest (7)