diff options
author | Damian Gryski <[email protected]> | 2024-10-25 07:24:01 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-25 16:24:01 +0200 |
commit | 9a6397b3252aa3f3a55953ab56b93e981b88426d (patch) | |
tree | f4befca6db9a283e15dc26bc9baba723e2dd34fa | |
parent | b8420e78bb3fe9db73898f2168a91a27e313f1c8 (diff) | |
download | tinygo-9a6397b3252aa3f3a55953ab56b93e981b88426d.tar.gz tinygo-9a6397b3252aa3f3a55953ab56b93e981b88426d.zip |
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.
-rw-r--r-- | builder/sizes_test.go | 2 | ||||
-rw-r--r-- | src/runtime/gc_blocks.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builder/sizes_test.go b/builder/sizes_test.go index 628ddee89..8b669462a 100644 --- a/builder/sizes_test.go +++ b/builder/sizes_test.go @@ -41,7 +41,7 @@ func TestBinarySize(t *testing.T) { // This is a small number of very diverse targets that we want to test. tests := []sizeTest{ // microcontrollers - {"hifive1b", "examples/echo", 4560, 280, 0, 2268}, + {"hifive1b", "examples/echo", 4568, 280, 0, 2268}, {"microbit", "examples/serial", 2868, 388, 8, 2272}, {"wioterminal", "examples/pininterrupt", 6104, 1484, 116, 6832}, diff --git a/src/runtime/gc_blocks.go b/src/runtime/gc_blocks.go index 1cc238494..3c3862dbb 100644 --- a/src/runtime/gc_blocks.go +++ b/src/runtime/gc_blocks.go @@ -45,7 +45,7 @@ const ( bytesPerBlock = wordsPerBlock * unsafe.Sizeof(heapStart) stateBits = 2 // how many bits a block state takes (see blockState type) blocksPerStateByte = 8 / stateBits - markStackSize = 4 * unsafe.Sizeof((*int)(nil)) // number of to-be-marked blocks to queue before forcing a rescan + markStackSize = 8 * unsafe.Sizeof((*int)(nil)) // number of to-be-marked blocks to queue before forcing a rescan ) var ( |