From c5babcc4852397b49ec43778d517ab59f5b10ef7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 26 Feb 2019 15:52:23 -0800 Subject: [PATCH] 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 --- src/runtime/malloc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1