]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: align first persistentalloc chunk as requested
authorIan Lance Taylor <iant@golang.org>
Tue, 26 Feb 2019 23:52:23 +0000 (15:52 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 6 Mar 2019 21:33:41 +0000 (21:33 +0000)
Change-Id: Ib391e019b1a7513d234fb1c8ff802efe8fa7c950
Reviewed-on: https://go-review.googlesource.com/c/go/+/163859
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/malloc.go

index 6695372a3feaad5ea90f91c2338cecf4ab0c4881..be3a9bd26f5381faf03be978ba1fab91d5d6ee9f 100644 (file)
@@ -1248,7 +1248,7 @@ func persistentalloc1(size, align uintptr, sysStat *uint64) *notInHeap {
                                break
                        }
                }
-               persistent.off = sys.PtrSize
+               persistent.off = round(sys.PtrSize, align)
        }
        p := persistent.base.add(persistent.off)
        persistent.off += size