Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/gc/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

SSL bug-1531626.js

  Sprache: JAVA
 

// Test that setting the nursery size works as expected.
//
// It's an error to set the minimum size greater than the maximum
// size. Parameter values are rounded to the nearest legal nursery
// size.

load(libdir + "asserts.js");

const chunkSizeKB = gcparam('chunkBytes') / 1024;
const pageSizeKB = gcparam('systemPageSizeKB');

const testSizesKB = [128129255256516102310243*10244*1024+116*1024];

// Valid maximum sizes must be >= 1MB.
const testMaxSizesKB = testSizesKB.filter(x => x >= 1024);

for (let max of testMaxSizesKB) {
  // Don't test minimums greater than the maximum.
  for (let min of testSizesKB.filter(x => x <= max)) {
    setMinMax(min, max);
  }
}

// The above loops raised the nursery size.  Now reduce it to ensure that
// forcibly-reducing it works correctly.
setMinMax(2561024);

// Try invalid configurations.
const badSizesKB = [ 01129 * 1024];
function assertParamOutOfRange(f) {
  assertErrorMessage(f, Object, "Parameter value out of range");
}
for (let size of badSizesKB) {
  assertParamOutOfRange(() => gcparam('minNurseryBytes', size * 1024));
  assertParamOutOfRange(() => gcparam('maxNurseryBytes', size * 1024));
}

function setMinMax(min, max) {
  gcparam('minNurseryBytes', min * 1024);
  gcparam('maxNurseryBytes', max * 1024);
  assertEq(gcparam('minNurseryBytes'), nearestLegalSize(min) * 1024);
  assertEq(gcparam('maxNurseryBytes'), nearestLegalSize(max) * 1024);
  allocateSomeThings();
  gc();
}

function allocateSomeThings() {
  for (let i = 0; i < 1000; i++) {
    let obj = { an: 'object', with: 'fields' };
  }
}

function nearestLegalSize(sizeKB) {
  let step = sizeKB >= chunkSizeKB ? chunkSizeKB : pageSizeKB;
  return round(sizeKB, step);
}

function round(x, y) {
  x += y / 2;
  return x - (x % y);
}

Messung V0.5 in Prozent
C=92 H=83 G=87

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Versionsinformation zu Columbo

Bemerkung:

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Anfrage:

Dauer der Verarbeitung:

Sekunden

sprechenden Kalenders