← Back to context

Comment by meisel

1 day ago

I believe there’s no other allocator besides jemalloc that can seamlessly override macOS malloc/free like people do with LD_PRELOAD on Linux (at least as of ~2020). jemalloc has a very nice zone-based way of making itself the default, and manages to accommodate Apple’s odd requirements for an allocator that have tripped other third-party allocators up when trying to override malloc/free.

Note this requires hackery that relies on Apple not changing things in its system allocator, which has happened at least twice IIRC.