Extracting GC.stress test helper.