diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs index dbbb6758593b0..e3e091bb872a2 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs @@ -899,13 +899,10 @@ internal enum RefreshMemoryStatus /// /// This API will only handle configs that could be handled when the runtime is loaded, for example, for configs that don't have any effects on 32-bit systems (like the GCHeapHardLimit* ones), this API will not handle it. /// - /// As of now, this API is feature preview only and subject to changes as necessary. - /// /// If the hard limit is too low. This can happen if the heap hard limit that the refresh will set, either because of new AppData settings or implied by the container memory limit changes, is lower than what is already committed. /// If the hard limit is invalid. This can happen, for example, with negative heap hard limit percentages. /// /// - [RequiresPreviewFeatures("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { ulong heapHardLimit = (AppContext.GetData("GCHeapHardLimit") as ulong?) ?? ulong.MaxValue; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs index 5ebcfc6c0771c..3d263d5de6b63 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs @@ -869,7 +869,6 @@ public static TimeSpan GetTotalPauseDuration() return new TimeSpan(RuntimeImports.RhGetTotalPauseDuration()); } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { ulong heapHardLimit = (AppContext.GetData("GCHeapHardLimit") as ulong?) ?? ulong.MaxValue; diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 69b59b9e16bed..1c4acbda50338 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -2722,7 +2722,6 @@ public static void SuppressFinalize(object obj) { } public static void WaitForPendingFinalizers() { } public static TimeSpan GetTotalPauseDuration() { throw null; } public static System.Collections.Generic.IReadOnlyDictionary GetConfigurationVariables() { throw null; } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { throw null; } } diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml index 05317adadabbf..047e1d5d11e07 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml @@ -1,4 +1,22 @@  - + + CP0014 + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/mscorlib.dll + net9.0/mscorlib.dll + + + CP0014 + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/netstandard.dll + net9.0/netstandard.dll + + + CP0014 + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/System.Runtime.dll + net9.0/System.Runtime.dll + + \ No newline at end of file diff --git a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs index 9e87bfe1e167a..485576645537f 100644 --- a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs @@ -320,7 +320,6 @@ public static System.Collections.Generic.IReadOnlyDictionary Get return new System.Collections.Generic.Dictionary(); } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { throw new PlatformNotSupportedException();