Clamp benchmark numBlocks to at least 1 so large block sizes still run.

This commit is contained in:
night1rider
2026-07-11 22:29:35 -06:00
parent 5d0da8e173
commit b4fa08753f
+4
View File
@@ -17064,6 +17064,10 @@ void benchmark_configure(word32 block_size)
/* must be greater than 0 */
if (block_size > 0) {
numBlocks = (int)((word32)numBlocks * bench_size / block_size);
/* integer division can truncate to 0 for large block sizes; keep at
* least one block so the algorithm actually runs. */
if (numBlocks < 1)
numBlocks = 1;
bench_size = block_size;
}
}