Skip to content

Commit

Permalink
test: reduce buffer size in buffer-creation test
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Julien Gilli <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
thefourtheye authored and andrew749 committed Jul 19, 2017
1 parent ad9318b commit 77aace9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-buffer-creation-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const acceptableOOMErrors = [
'Invalid array buffer length'
];

const size = 8589934592; /* 1 << 33 */
const offset = 4294967296; /* 1 << 32 */
const length = 1000;
const offset = 4294967296; /* 1 << 32 */
const size = offset + length;
let arrayBuffer;

try {
Expand Down

0 comments on commit 77aace9

Please sign in to comment.