Commit graph

4 commits

Author SHA1 Message Date
Andreas Kling
fc02ab95fe AK: Allocate string data in a dedicated heap partition
Add a string heap partition and route long AK string backing
allocations through it.

Give StringBuilder partition-aware outlined storage so adopted String
and Utf16String buffers are allocated from the string heap. Keep the
string heap thread-local because mimalloc heaps may only allocate from
their creating thread, while cross-thread frees are handled by mimalloc.
2026-06-10 20:38:18 +02:00
Ben Wiederhake
b13df3a426 AK: Remove unused include from ByteStringImpl 2026-02-17 12:38:51 +00:00
Andreas Kling
ce44ca57ea AK: Use constinit for the empty ByteStringImpl
Replace the lazy heap allocation with a constinit static that is
initialized at compile time. This eliminates both the heap allocation
and the runtime guard variable check on every access.

The EmptyByteStringImpl struct mirrors the exact layout of
ByteStringImpl and is verified with static_asserts.
2026-01-25 09:32:51 +01:00
Timothy Flynn
3f439efe21 AK: Rename StringImpl to ByteStringImpl
StringImpl is very specific to ByteString. Let's rename it to match, to
avoid confusion with the StringBase and StringData classes.
2025-04-07 17:44:38 +02:00
Renamed from AK/StringImpl.cpp (Browse further)