From b5fec2cf54ff9f7b562cb904a2a025266aec2763 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 17 Sep 2024 18:00:21 -0400 Subject: 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 Reviewed-by: Keith Randall Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI --- src/runtime/malloc.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/runtime') 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: -- cgit v1.3