From: Ian Lance Taylor Date: Tue, 26 Feb 2019 23:52:23 +0000 (-0800) Subject: runtime: align first persistentalloc chunk as requested X-Git-Tag: go1.13beta1~1174 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c5babcc4852397b49ec43778d517ab59f5b10ef7;p=gostls13.git runtime: align first persistentalloc chunk as requested Change-Id: Ib391e019b1a7513d234fb1c8ff802efe8fa7c950 Reviewed-on: https://go-review.googlesource.com/c/go/+/163859 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Austin Clements --- diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 6695372a3f..be3a9bd26f 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -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