current commit
201022.1 · src: add --heapsnapshot-near-heap-limit option
'use strict';

const { Worker } = require('worker_threads');
const path = require('path');
const max_snapshots = parseInt(process.env.TEST_SNAPSHOTS) || 1;
new Worker(path.join(__dirname, 'grow.js'), {
  execArgv: [
    `--heapsnapshot-near-heap-limit=${max_snapshots}`,
  ],
  resourceLimits: {
    maxOldGenerationSizeMb:
      parseInt(process.env.TEST_OLD_SPACE_SIZE) || 20
  }
});