I was reading the roadmap and I saw this from <KT-...
# kotlin-native
s
I was reading the roadmap and I saw this from KT-55512
• Google is working on a new memory allocator that should improve runtime performance as well as memory consumption. This important work also opens a path to further optimizations.
Google is implementing the memory allocator for Kotlin/native? I mean - if that's what's happening, that's awesome, I'm just trying to make sure I'm understanding this correctly.
🔥 3
l
I don’t think they’re creating it for Kotlin/Native. It sounds like Google is creating a new memory allocator and it can be used with K/N.
I’d like to find time to research the difference between tcmalloc and mimalloc to see what we’d be getting.
o
You can grep kotlin repo for “custom” in K/N allocator specific code There’s already some progress there
Not sure thought, if it uses tcmalloc or not
l
I know they currently ship mimalloc as of 1.6.0, with the choice to allow the std (platform) allocator as a compiler flag.
s
Folks from Google are working on a specialized allocator which is tightly integrated with Kotlin/Native runtime.
l
That’s cool. Is this separate from tcmalloc or an extension of it?
s
@sergey.bogolepov Hopefully this will make Kotlin Native's performance more similar to its comparable counterparts (i.e. Swift)
s
AFAIK, it is not related to tc or any other malloc implementation.