From ede501ae2b818c4c7ebe3dda02a17896bf98fedf Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:35:11 -0700 Subject: [PATCH] test: reduce AVR map memory pressure --- testdata/map.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testdata/map.go b/testdata/map.go index f5be02ab0..0f19ed097 100644 --- a/testdata/map.go +++ b/testdata/map.go @@ -123,8 +123,15 @@ func main() { println(`structMap[{"tau", 6.28}]:`, structMap[namedFloat{"tau", 6.28}]) // test preallocated map - squares := make(map[int]int, 200) - testBigMap(squares, 100) + mapSize := 200 + mapEntries := 100 + if unsafe.Sizeof(uintptr(0)) < 4 { + // Leave enough heap for the rest of this test on low-memory devices. + mapSize = 100 + mapEntries = 50 + } + squares := make(map[int]int, mapSize) + testBigMap(squares, mapEntries) println("tested preallocated map") // test growing maps