cmd/link: use read-only mmap to back selected symbol name strings
When reading symbol names from an object file, if a name does not need fixup (conversion of "". to package path), then generate a string whose backing store is in read-only memory (from an mmap of the object file), avoiding the need for an allocation. This yields a modest reduction in total linker heap use. Change-Id: I95719c93026b6cc82eb6947a9d14063cf3a6679c Reviewed-on: https://go-review.googlesource.com/c/go/+/173938 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment