11cb0ef41Sopenharmony_ci// Flags: --expose-gc 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_cirequire('../common'); 41cb0ef41Sopenharmony_ciconst { Worker } = require('worker_threads'); 51cb0ef41Sopenharmony_ciconst { testGCProfiler } = require('../common/v8'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciif (!process.env.isWorker) { 81cb0ef41Sopenharmony_ci process.env.isWorker = 1; 91cb0ef41Sopenharmony_ci new Worker(__filename); 101cb0ef41Sopenharmony_ci} else { 111cb0ef41Sopenharmony_ci testGCProfiler(); 121cb0ef41Sopenharmony_ci for (let i = 0; i < 100; i++) { 131cb0ef41Sopenharmony_ci new Array(100); 141cb0ef41Sopenharmony_ci } 151cb0ef41Sopenharmony_ci global?.gc(); 161cb0ef41Sopenharmony_ci} 17