Skip to content

Commit 4caae69

Browse files
thefourtheyeMylesBorins
authored andcommitted
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 1a63321 commit 4caae69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
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)