mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
b3663e0262
PR-URL: https://github.com/nodejs/node/pull/46735 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
17 lines
345 B
JavaScript
17 lines
345 B
JavaScript
// Flags: --expose-gc
|
|
'use strict';
|
|
require('../common');
|
|
const { Worker } = require('worker_threads');
|
|
const { testGCProfiler } = require('../common/v8');
|
|
|
|
if (!process.env.isWorker) {
|
|
process.env.isWorker = 1;
|
|
new Worker(__filename);
|
|
} else {
|
|
testGCProfiler();
|
|
for (let i = 0; i < 100; i++) {
|
|
new Array(100);
|
|
}
|
|
global?.gc();
|
|
}
|