run init in a goroutine

This commit is contained in:
Jaden Weiss
2020-02-07 19:20:36 -05:00
committed by Ayke
parent 5d869f6042
commit 0759b70c50
7 changed files with 21 additions and 7 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ func (b gcBlock) unmark() {
// No memory may be allocated before this is called. That means the runtime and
// any packages the runtime depends upon may not allocate memory during package
// initialization.
func init() {
func initHeap() {
totalSize := heapEnd - heapStart
// Allocate some memory to keep 2 bits of information about every block.