Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Apr 11, 2022
1 parent 80894b4 commit e9b05dc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-v8-serialize-leak.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
'use strict';
// Flags: --expose-gc

require('../common');
const v8 = require('v8');
const assert = require('assert');

const before = process.memoryUsage.rss();

for (let i = 0; i < 1000000; i++) {
v8.serialize("")
v8.serialize('');
}

gc()
global.gc();

const after = process.memoryUsage.rss();

assert(after - before < 1024 * 1024 * 10, `before=${before} after=${after}`);
assert(after - before < 1024 * 1024 * 10, `before=${before} after=${after}`);

0 comments on commit e9b05dc

Please sign in to comment.