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

Quelle  memory-grow.js

  Sprache: JAVA
 

// |jit-test| heavy; allow-oom; skip-if: !canRunHugeMemoryTests()

// This tests that we can grow the heap by more than 4GB.  Other grow tests are
// in basic.js.

for (let shared of ['''shared']) {
    try {
        var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`
(module
  (memory (export "mem") i64 0 65540 ${shared})
  (func (export "f") (param $delta i64) (result i64)
    (memory.grow (local.get $delta))))`)));
    } catch (e) {
        if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) {
            quit(0);
        }
        throw e;
    }

    let res = ins.exports.f(65537n);
    if (res === -1n) {
        quit(0);                    // OOM
    }
    assertEq(ins.exports.mem.buffer.byteLength, 65537*65536);
    let mem = new Uint8Array(ins.exports.mem.buffer);
    mem[65537*65536-1] = 37;
    assertEq(mem[65537*65536-1], 37);

    assertEq(ins.exports.f(4n), -1n);
}


Messung V0.5 in Prozent
C=86 H=95 G=90

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.