ladybird/Libraries/LibRegex
Andreas Kling b23aa38546 AK: Adopt mimalloc v2 as main allocator
Use mimalloc for Ladybird-owned allocations without overriding malloc().
Route kmalloc(), kcalloc(), krealloc(), and kfree() through mimalloc,
and put the embedded Rust crates on the same allocator via a shared
shim in AK/kmalloc.cpp.

This also lets us drop kfree_sized(), since it no longer used its size
argument. StringData, Utf16StringData, JS object storage, Rust error
strings, and the CoreAudio playback helpers can all free their AK-backed
storage with plain kfree().

Sanitizer builds still use the system allocator. LeakSanitizer does not
reliably trace references stored in mimalloc-managed AK containers, so
static caches and other long-lived roots can look leaked. Pass the old
size into the Rust realloc shim so aligned fallback reallocations can
move posix_memalign-backed blocks safely.

Static builds still need a little linker help. macOS app binaries need
the Rust allocator entry points forced in from liblagom-ak.a, while
static ELF links can pull in identical allocator shim definitions from
multiple Rust staticlibs. Keep the Apple -u flags and allow those
duplicate shim symbols for LibJS and LibRegex links on Linux and BSD.
2026-04-08 09:57:53 +02:00
..
Rust AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
CMakeLists.txt AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
ECMAScriptRegex.cpp LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00
ECMAScriptRegex.h LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00
RustRegex.cpp Meta: Remove ENABLE_RUST build configuration option 2026-04-02 22:59:42 +02:00
RustRegex.h Meta: Remove ENABLE_RUST build configuration option 2026-04-02 22:59:42 +02:00