Skip to content

Commit 9a6397b

Browse files
authored
runtime: bump markStackSize
Every time we overflow the stack, we have to do a full rescan of the heap. Making this larger means fewer overflows and thus fewer secondary+ heap scans.
1 parent b8420e7 commit 9a6397b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builder/sizes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestBinarySize(t *testing.T) {
4141
// This is a small number of very diverse targets that we want to test.
4242
tests := []sizeTest{
4343
// microcontrollers
44-
{"hifive1b", "examples/echo", 4560, 280, 0, 2268},
44+
{"hifive1b", "examples/echo", 4568, 280, 0, 2268},
4545
{"microbit", "examples/serial", 2868, 388, 8, 2272},
4646
{"wioterminal", "examples/pininterrupt", 6104, 1484, 116, 6832},
4747

src/runtime/gc_blocks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
bytesPerBlock = wordsPerBlock * unsafe.Sizeof(heapStart)
4646
stateBits = 2 // how many bits a block state takes (see blockState type)
4747
blocksPerStateByte = 8 / stateBits
48-
markStackSize = 4 * unsafe.Sizeof((*int)(nil)) // number of to-be-marked blocks to queue before forcing a rescan
48+
markStackSize = 8 * unsafe.Sizeof((*int)(nil)) // number of to-be-marked blocks to queue before forcing a rescan
4949
)
5050

5151
var (

0 commit comments

Comments
 (0)