Skip to content

Commit 77aace9

Browse files
thefourtheyeandrew749
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: nodejs/node#11177 Ref: nodejs/node#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 ad9318b commit 77aace9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)