blob: 045dde66e0b6c36d4eb55acfc2126f6e45a368ff [file] [log] [blame]
//@ skip if $memoryLimited
//@ requireOptions("-e", "let arraysize=0x100000") if ["arm", "mips"].include?($architecture)
//@ runDefault("--useConcurrentJIT=0", "--thresholdForJITAfterWarmUp=10", "--slowPathAllocsBetweenGCs=10", "--useConcurrentGC=0")
arraysize = typeof(arraysize) === 'undefined' ? 0x1000000 : arraysize;
function fullGC() {
for (var i = 0; i < 10; i++) {
new Float64Array(arraysize);
}
}
function outer() {
function f() {
try {
const r = f();
} catch(e) {
const o = Object();
function inner(a1, a2, a3) {
try {
const r1 = new Uint32Array();
const r2 = r1.values();
} catch(e2) {
}
}
const result = inner();
}
}
f();
function edenGC() {
for (let i = 0; i < 100; i++) {
const floatArray = new Float64Array(0x10000);
}
}
edenGC();
}
for (let i = 0; i < 100; i++) {
const result = outer();
}
fullGC();