From f19b2887178cdaeb7b67cd1e2f24cf0a41c34311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20IRMAK?= Date: Wed, 28 May 2025 10:35:09 +0300 Subject: [PATCH] runtime/debug: add GC related stubs --- src/runtime/debug/garbage.go | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/runtime/debug/garbage.go diff --git a/src/runtime/debug/garbage.go b/src/runtime/debug/garbage.go new file mode 100644 index 000000000..cf6cac049 --- /dev/null +++ b/src/runtime/debug/garbage.go @@ -0,0 +1,37 @@ +// Package debug is a very partially implemented package to allow compilation. +package debug + +import ( + "time" +) + +type GCStats struct { + LastGC time.Time + NumGC int64 + PauseTotal time.Duration + Pause []time.Duration + PauseEnd []time.Time + PauseQuantiles []time.Duration +} + +func ReadGCStats(stats *GCStats) { +} + +func FreeOSMemory() { +} + +func SetMaxThreads(threads int) int { + return threads +} + +func SetPanicOnFault(enabled bool) bool { + return enabled +} + +func WriteHeapDump(fd uintptr) + +func SetTraceback(level string) + +func SetMemoryLimit(limit int64) int64 { + return limit +}