Skip to content

Commit d51f4f3

Browse files
committed
test: reduce buffer size in buffer-creation test
This test is allocating much more memory than necessary to actually reproduce the original problem. Lowering the amount of memory allocated increases performance at least in some cases and makes this test less likely to time out on SmartOS. PR-URL: #11177 Ref: #10166 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Julien Gilli <jgilli@nodejs.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent ba0e3ac commit d51f4f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sequential/test-buffer-creation-regression.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const acceptableOOMErrors = [
2020
'Invalid array buffer length'
2121
];
2222

23-
const size = 8589934592; /* 1 << 33 */
24-
const offset = 4294967296; /* 1 << 32 */
2523
const length = 1000;
24+
const offset = 4294967296; /* 1 << 32 */
25+
const size = offset + length;
2626
let arrayBuffer;
2727

2828
try {

0 commit comments

Comments
 (0)