From: Jeremy Faller Date: Thu, 6 Aug 2020 13:54:54 +0000 (-0400) Subject: [dev.link] cmd/link: fix preallocation for function names X-Git-Tag: go1.16beta1~1378^2~13 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=64fdc8b47a77d090def16d76ddf3522fac035a1e;p=gostls13.git [dev.link] cmd/link: fix preallocation for function names This preallocation is way too large, and showed up in the metrics. Just remove it all together. Change-Id: Ib4646b63cd0a903656ada244f15e977cde2a2c4c Reviewed-on: https://go-review.googlesource.com/c/go/+/247177 Run-TryBot: Jeremy Faller TryBot-Result: Gobot Gobot Reviewed-by: Austin Clements --- diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go index 936cfe2868..606736e271 100644 --- a/src/cmd/link/internal/ld/pcln.go +++ b/src/cmd/link/internal/ld/pcln.go @@ -104,7 +104,7 @@ func makePclntab(ctxt *Link, container loader.Bitmap) (*pclntab, []*sym.Compilat ldr := ctxt.loader state := &pclntab{ - funcNameOffset: make(map[loader.Sym]int32, ldr.NSym()), + funcNameOffset: make(map[loader.Sym]int32), } // Gather some basic stats and info.