Skip to content

Commit c5babcc

Browse files
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Austin Clements <[email protected]>
1 parent 711ea1e commit c5babcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/malloc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ func persistentalloc1(size, align uintptr, sysStat *uint64) *notInHeap {
12481248
break
12491249
}
12501250
}
1251-
persistent.off = sys.PtrSize
1251+
persistent.off = round(sys.PtrSize, align)
12521252
}
12531253
p := persistent.base.add(persistent.off)
12541254
persistent.off += size

0 commit comments

Comments
 (0)