diff options
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 43b7e7970d..e85535ea9f 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -360,7 +360,7 @@ func mallocinit() { // To overcome this we ask for PageSize more and round up the pointer. p1 := round(p, _PageSize) - mheap_.spans = (**mspan)(unsafe.Pointer(p1)) + spansStart := p1 mheap_.bitmap = p1 + spansSize + bitmapSize if sys.PtrSize == 4 { // Set arena_start such that we can accept memory @@ -379,7 +379,7 @@ func mallocinit() { } // Initialize the rest of the allocator. - mheap_.init(spansSize) + mheap_.init(spansStart, spansSize) _g_ := getg() _g_.m.mcache = allocmcache() } |
