diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go index 987e17c30c..d6395cbf90 100644 --- a/src/runtime/mstats.go +++ b/src/runtime/mstats.go @@ -82,4 +82,10 @@ type MemStats struct { // GCSys is bytes of memory in garbage collection metadata. GCSys uint64 + + // NumGC is the number of completed GC cycles. + // + // TinyGo does not track GC cycle counts; present for API compatibility so + // callers that read runtime.MemStats.NumGC compile (it stays 0). + NumGC uint32 }