GC.RegisterNoGCRegionCallback(Int64, Action) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a callback to be invoked when a certain amount of memory is allocated in the no GC region.
public:
static void RegisterNoGCRegionCallback(long totalSize, Action ^ callback);
public static void RegisterNoGCRegionCallback (long totalSize, Action callback);
static member RegisterNoGCRegionCallback : int64 * Action -> unit
Public Shared Sub RegisterNoGCRegionCallback (totalSize As Long, callback As Action)
Parameters
- totalSize
- Int64
The total size of the no GC region.
- callback
- Action
The callback to be executed when a certain amount of memory is allocated in the no GC region.
Exceptions
totalSize
is less than or equal to 0.
The callback
argument is null
.
The GC is not currently under a NoGC region.
-or-
Another callback is already registered.
-or-
The totalSize
exceeds the size of the No GC region.
-or-
The operation to withhold memory for the callback failed.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om