aboutsummaryrefslogtreecommitdiff
path: root/src/internal/runtime/maps/export_test.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2024-10-25 15:08:54 -0400
committerGopher Robot <gobot@golang.org>2024-10-30 15:43:54 +0000
commit63ba2b9d84dede1df107db30b4ff8139711402eb (patch)
treeab604c55740391f9205499bd0745685191a91020 /src/internal/runtime/maps/export_test.go
parentaefb173b0a1c1edfdd631b8b4ac752b947ab80a8 (diff)
downloadgo-63ba2b9d84dede1df107db30b4ff8139711402eb.tar.xz
cmd/compile,internal/runtime/maps: stack allocated maps and small alloc
The compiler will stack allocate the Map struct and initial group if possible. Stack maps are initialized inline without calling into the runtime. Small heap allocated maps use makemap_small. These are the same heuristics as existing maps. For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap Change-Id: I6c371d1309716fd1c38a3212d417b3c76db5c9b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/622042 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/internal/runtime/maps/export_test.go')
-rw-r--r--src/internal/runtime/maps/export_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/runtime/maps/export_test.go b/src/internal/runtime/maps/export_test.go
index 3846fea21b..2c7b05ea2d 100644
--- a/src/internal/runtime/maps/export_test.go
+++ b/src/internal/runtime/maps/export_test.go
@@ -24,7 +24,7 @@ const maxAllocTest = 1 << 30
func NewTestMap[K comparable, V any](hint uintptr) (*Map, *abi.SwissMapType) {
mt := newTestMapType[K, V]()
- return NewMap(mt, hint, maxAllocTest), mt
+ return NewMap(mt, hint, nil, maxAllocTest), mt
}
func (m *Map) TableCount() int {