Remix.run Logo
foltik 6 hours ago

> Mi-malloc is the better choice if you must preload a library, but there are even better choices.

What’s a better choice?

jeffbee 6 hours ago | parent [-]

Linking the allocator into your program when you build it, instead of overriding just malloc and free at runtime. Then you can choose between jemalloc, mi-malloc, TCMalloc, or whatever you please, and get better features such as C++ sized delete. Rust makes this easy with for example "use tcmalloc_better::TCMalloc".