Skip to content

Commit f19b288

Browse files
omerfirmakdeadprogram
authored andcommitted
runtime/debug: add GC related stubs
1 parent 7c54dbc commit f19b288

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/runtime/debug/garbage.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Package debug is a very partially implemented package to allow compilation.
2+
package debug
3+
4+
import (
5+
"time"
6+
)
7+
8+
type GCStats struct {
9+
LastGC time.Time
10+
NumGC int64
11+
PauseTotal time.Duration
12+
Pause []time.Duration
13+
PauseEnd []time.Time
14+
PauseQuantiles []time.Duration
15+
}
16+
17+
func ReadGCStats(stats *GCStats) {
18+
}
19+
20+
func FreeOSMemory() {
21+
}
22+
23+
func SetMaxThreads(threads int) int {
24+
return threads
25+
}
26+
27+
func SetPanicOnFault(enabled bool) bool {
28+
return enabled
29+
}
30+
31+
func WriteHeapDump(fd uintptr)
32+
33+
func SetTraceback(level string)
34+
35+
func SetMemoryLimit(limit int64) int64 {
36+
return limit
37+
}

0 commit comments

Comments
 (0)