INNER CODE UNIT · JavaScript

p

FStarLang/karamel · krmllib/js/loader.js:182

    let p = (memSize - 4) - heap_size - sz;
    // Adjusted to fall on a 64-bit boundary; header is 64 bits so data is
    // aligned, too.
    p -= (p % 8);
    // The heap size doesn't take into account the heap size counter itself.
    let new_heap_size = (memSize - 4) - p;
    m32[heap_size_addr] = new_heap_size;
    // Header contains size of allocation block.
    m32[p/4] = sz;
    my_print("total mem_size: " + p32(memSize) + "; new allocation: " + p32(sz) + " bytes, header: 0x" + p32(p));
    my_print("new heap size: "+p32(new_heap_size));
    return p+8;
  }
});

let mkFStar = () => dummyModule(
  [ "FStar_UInt128_constant_time_carry_ok", "FStar_PropositionalExtensionality_axiom" ],
  [ "FStar_Monotonic_Heap_lemma_mref_injectivity" ]);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…