Skip to content

Commit 1afa706

Browse files
committed
fix: limit threads to 1 on riscv64
1 parent de9922a commit 1afa706

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/utils/configuration/index.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export const getDefaultConfig = lazy(() =>
3333
}),
3434
},
3535

36-
threads: cpus().length,
36+
// The number of wasm memory instances is severely limited on
37+
// riscv64 with sv39. Running multiple generators that use wasm in
38+
// parallel could cause failures to allocate new wasm instance.
39+
// See also https://github.com/nodejs/node/pull/60591
40+
threads: process.arch === 'riscv64' ? 1 : cpus().length,
3741
chunkSize: 10,
3842
})
3943
)

0 commit comments

Comments
 (0)