Skip to content

Commit b83d76c

Browse files
committed
test: gc before test-memory-usage baseline
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
1 parent bbf51ad commit b83d76c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/parallel/test-memory-usage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
// Flags: --predictable-gc-schedule
22+
// Flags: --expose-gc --predictable-gc-schedule
2323
'use strict';
2424
const common = require('../common');
2525
const assert = require('assert');
2626

27+
// Clear stale ArrayBuffer backing stores before taking the baseline so the
28+
// exact allocation delta below is not affected by unrelated cleanup.
29+
globalThis.gc();
30+
2731
const r = process.memoryUsage();
2832
// On IBMi, the rss memory always returns zero
2933
if (!common.isIBMi) {

0 commit comments

Comments
 (0)