From b83d76c435227dcfe0f4abc3aa576abd8bfef4fa Mon Sep 17 00:00:00 2001 From: inoway46 Date: Sun, 10 May 2026 01:07:43 +0900 Subject: [PATCH] test: gc before test-memory-usage baseline Signed-off-by: inoway46 --- test/parallel/test-memory-usage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-memory-usage.js b/test/parallel/test-memory-usage.js index 8e5ea4de5bf587..7cf6f565732eb2 100644 --- a/test/parallel/test-memory-usage.js +++ b/test/parallel/test-memory-usage.js @@ -19,11 +19,15 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -// Flags: --predictable-gc-schedule +// Flags: --expose-gc --predictable-gc-schedule 'use strict'; const common = require('../common'); const assert = require('assert'); +// Clear stale ArrayBuffer backing stores before taking the baseline so the +// exact allocation delta below is not affected by unrelated cleanup. +globalThis.gc(); + const r = process.memoryUsage(); // On IBMi, the rss memory always returns zero if (!common.isIBMi) {