mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Revert "runtime: redo heap bitmap"
This reverts commit b589208c8c.
Reason for revert: Bug somewhere in this code, causing wasm and maybe linux/386 to fail.
Change-Id: I5e1e501d839584e0219271bb937e94348f83c11f
Reviewed-on: https://go-review.googlesource.com/c/go/+/422395
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
e1a8e0e05d
commit
ad0287f496
12 changed files with 1126 additions and 530 deletions
|
|
@ -260,14 +260,12 @@ func growslice(et *_type, old slice, cap int) slice {
|
|||
capmem = roundupsize(uintptr(newcap) << shift)
|
||||
overflow = uintptr(newcap) > (maxAlloc >> shift)
|
||||
newcap = int(capmem >> shift)
|
||||
capmem = uintptr(newcap) << shift
|
||||
default:
|
||||
lenmem = uintptr(old.len) * et.size
|
||||
newlenmem = uintptr(cap) * et.size
|
||||
capmem, overflow = math.MulUintptr(et.size, uintptr(newcap))
|
||||
capmem = roundupsize(capmem)
|
||||
newcap = int(capmem / et.size)
|
||||
capmem = uintptr(newcap) * et.size
|
||||
}
|
||||
|
||||
// The check of overflow in addition to capmem > maxAlloc is needed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue