aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2024-09-17 18:00:21 -0400
committerGopher Robot <gobot@golang.org>2024-10-30 15:11:27 +0000
commitb5fec2cf54ff9f7b562cb904a2a025266aec2763 (patch)
treebe774c2cef2df29292da32aa083577c207fe2500 /src/runtime/malloc.go
parent2220fd36368c96da3dd833bdc2bbd13be291216a (diff)
downloadgo-b5fec2cf54ff9f7b562cb904a2a025266aec2763.tar.xz
cmd/compile,runtime: add indirect key/elem to swissmap
We use the same heuristics as existing maps. For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap Change-Id: I44bb51483cae2c1714717f1b501850fb9e55a39a Reviewed-on: https://go-review.googlesource.com/c/go/+/616461 Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index 0605921652..e23d8224d1 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -1714,6 +1714,11 @@ func newobject(typ *_type) unsafe.Pointer {
return mallocgc(typ.Size_, typ, true)
}
+//go:linkname maps_newobject internal/runtime/maps.newobject
+func maps_newobject(typ *_type) unsafe.Pointer {
+ return newobject(typ)
+}
+
// reflect_unsafe_New is meant for package reflect,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include: