From 4d8ca501ae2193900dc1069596c83888be4afb2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kollert?= Date: Thu, 10 Sep 2026 16:14:43 +0200 Subject: [PATCH 1/2] Fix obsolete IGCHeap hosting comment Replace the stale GC hosting description and nonexistent corehost.cpp reference with a description of the heap sizing and virtual memory limit APIs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/coreclr/gc/gcinterface.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/coreclr/gc/gcinterface.h b/src/coreclr/gc/gcinterface.h index 8a16b9b7d60582..6b70a8d6040dff 100644 --- a/src/coreclr/gc/gcinterface.h +++ b/src/coreclr/gc/gcinterface.h @@ -658,10 +658,7 @@ class IGCHeap { public: /* =========================================================================== - Hosting APIs. These are used by GC hosting. The code that - calls these methods may possibly be moved behind the interface - - today, the VM handles the setting of segment size and max gen 0 size. - (See src/vm/corehost.cpp) + Heap sizing and virtual memory limit APIs. =========================================================================== */ From 0f1c215048caf69497ce1015b2cd522a16b46585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kollert?= Date: Thu, 10 Sep 2026 20:20:55 +0200 Subject: [PATCH 2/2] Clarify usage of legacy IGCHeap methods Distinguish methods no longer called by the VM from the unused reserved virtual memory limit setter, following review feedback. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/coreclr/gc/gcinterface.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreclr/gc/gcinterface.h b/src/coreclr/gc/gcinterface.h index 6b70a8d6040dff..fc27e0cc499136 100644 --- a/src/coreclr/gc/gcinterface.h +++ b/src/coreclr/gc/gcinterface.h @@ -663,15 +663,18 @@ class IGCHeap { */ // Returns whether or not the given size is a valid segment size. + // No longer used by the VM in .NET Core 2.1+ virtual bool IsValidSegmentSize(size_t size) PURE_VIRTUAL // Returns whether or not the given size is a valid gen 0 max size. + // No longer used by the VM in .NET Core 2.1+ virtual bool IsValidGen0MaxSize(size_t size) PURE_VIRTUAL // Gets a valid segment size. virtual size_t GetValidSegmentSize(bool large_seg = false) PURE_VIRTUAL // Sets the limit for reserved virtual memory. + // No longer used in .NET Core 2.1+ virtual void SetReservedVMLimit(size_t vmlimit) PURE_VIRTUAL /*