Alternative malloc implementations (tcmalloc, jemalloc, mimalloc)

Ever curious to eek every last bit of performance out of Swift in our embedded audio application, I'm wondering if anyone has tried some of the popular alternative malloc implementations?

On our device I am seeing the known issue with glibc malloc where memory is not returned to the kernel but I don't think it's a problem yet. But that's not to say it won't be as we do more testing.

1 Like

In the server ecosystem we use jemalloc for this reason

1 Like

Great, just with LD_PRELOAD?

Either that or explicitly:

2 Likes

On the context of jemalloc:

We have it on our todo to check out mimalloc too at some point…

2 Likes