]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: fix preallocation for function names
authorJeremy Faller <jeremy@golang.org>
Thu, 6 Aug 2020 13:54:54 +0000 (09:54 -0400)
committerJeremy Faller <jeremy@golang.org>
Fri, 7 Aug 2020 15:34:29 +0000 (15:34 +0000)
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 <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/link/internal/ld/pcln.go

index 936cfe28683d4d21180300f895bdef2dc8bbc548..606736e2719f4e4b0db38f9ae7e1faf88b4d6214 100644 (file)
@@ -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.