louise
The Louise language: compiler, runtime, std, tooling
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#121 · main · 16 min 23 s
0Étoiles
0Forks
40Issues
Runtime: allocate blocks with mimalloc (issue #35)
ADR 0002 planned "the system allocator, then mimalloc" behind tl_alloc and tl_free. Blocks now come from mimalloc, called directly through its GlobalAlloc implementation; the runtime's own Rust allocations keep Rust's global allocator, so a native Rust dependency (its own static library with its own std) never sees a different global allocator. mimalloc supports freeing a block on another thread than the one that allocated it, which actors and messages do. The `mimalloc` cargo feature (default) selects it; without it, blocks come from the system allocator. ASan only sees malloc'd memory (a use-after-free of a mimalloc block goes unreported), so the sanitizer steps of ci.sh and spike.sh --asan link a runtime built without the feature, in target/sanitize. Measured on the benchmarks (one thread, user-space perf counters): 2-10% fewer instructions, cycles within noise (-3% to +3%). The benchmarks are not allocator-bound; the numbers are in ADR 0002. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents be4f962
7 fichiers modifiés, 76 ajouts, 12 suppressions
Cargo.lock+19−0docs/adr/0002-memory-model.md+14−0docs/runtime-abi.md+5−1runtime/tilrt/Cargo.toml+5−1runtime/tilrt/src/heap.rs+18−5scripts/ci.sh+7−2scripts/spike.sh+8−3