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: #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>
  • Loading branch information
thefourtheye authored and MylesBorins committed Apr 19, 2017
1 parent 1a63321 commit 4caae69
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 4caae69

Please sign in to comment.