We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b3eb3f commit 8068419Copy full SHA for 8068419
src/runtime/gc_leaking.go
@@ -11,7 +11,7 @@ import (
11
)
12
13
// Ever-incrementing pointer: no memory is freed.
14
-var heapptr = heapStart
+var heapptr uintptr
15
16
// Total amount allocated for runtime.MemStats
17
var gcTotalAlloc uint64
@@ -93,7 +93,8 @@ func SetFinalizer(obj interface{}, finalizer interface{}) {
93
}
94
95
func initHeap() {
96
- // preinit() may have moved heapStart; reset heapptr
+ // Initialize this bump-pointer allocator to the start of the heap.
97
+ // Needed here because heapStart may not be a compile-time constant.
98
heapptr = heapStart
99
100
0 commit comments