summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1568740.js
blob: 5c311b855dcbc1cc1519044c1bb14c2380dfbbee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
gczeal(0);
gcparam("semispaceNurseryEnabled", 0);

function setAndTest(param, value) {
  gcparam(param, value);
  assertEq(gcparam(param), value);
}

// Set a large nursery size.
setAndTest("maxNurseryBytes", 1024*1024);
setAndTest("minNurseryBytes", 1024*1024);
minorgc();
assertEq(gcparam("nurseryBytes"), 1024*1024);

// Force it to shrink by more then one half.
setAndTest("minNurseryBytes", 64*1024);
setAndTest("maxNurseryBytes", 64*1024);
minorgc();
assertEq(gcparam("nurseryBytes"), 64*1024);