Skip to content

Commit d1a08c8

Browse files
authored
fix: reduce the memory consumption when running --experimental-vm-threads (#3872)
1 parent a08e599 commit d1a08c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vitest/src/node/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export function resolveConfig(
215215

216216
resolved.experimentalVmWorkerMemoryLimit = stringToBytes(
217217
getWorkerMemoryLimit(resolved),
218-
totalmem(),
218+
resolved.watch ? totalmem() / 2 : totalmem(),
219219
)
220220

221221
if (options.resolveSnapshotPath)

0 commit comments

Comments
 (0)