File tree Expand file tree Collapse file tree 5 files changed +19
-9
lines changed Expand file tree Collapse file tree 5 files changed +19
-9
lines changed Original file line number Diff line number Diff line change
1
+ //go:build runtime_asserts
2
+
3
+ package runtime
4
+
5
+ // enable assertions for the garbage collector
6
+ const gcAsserts = true
7
+
8
+ // enable asserts for the scheduler
9
+ const schedulerAsserts = true
Original file line number Diff line number Diff line change
1
+ //go:build !runtime_asserts
2
+
3
+ package runtime
4
+
5
+ // disable assertions for the garbage collector
6
+ const gcAsserts = false
7
+
8
+ // disable assertions for the scheduler
9
+ const schedulerAsserts = false
Original file line number Diff line number Diff line change @@ -37,11 +37,7 @@ import (
37
37
"unsafe"
38
38
)
39
39
40
- // Set gcDebug to true to print debug information.
41
- const (
42
- gcDebug = false // print debug info
43
- gcAsserts = gcDebug // perform sanity checks
44
- )
40
+ const gcDebug = false
45
41
46
42
// Some globals + constants for the entire GC.
47
43
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import (
11
11
"unsafe"
12
12
)
13
13
14
- const gcAsserts = false // perform sanity checks
15
-
16
14
// Ever-incrementing pointer: no memory is freed.
17
15
var heapptr = heapStart
18
16
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import (
11
11
"unsafe"
12
12
)
13
13
14
- const gcAsserts = false // perform sanity checks
15
-
16
14
var gcTotalAlloc uint64 // for runtime.MemStats
17
15
var gcMallocs uint64
18
16
var gcFrees uint64
You can’t perform that action at this time.
0 commit comments