tobogganSe connecter

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.

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>

olivier · il y a 1 mois · f6d81d983c52dc01fc12e4c2bb3157ca21766752

Parents be4f962

7 fichiers modifiés, 76 ajouts, 12 suppressions