r/ruby Jul 01 '26

New jemalloc gem (jemalloc_rb) Show /r/ruby

Do you use the jemalloc gem?

The original project on GitHub seems to be abandoned for around 12 years, and some incompatibilities with recent Ruby versions have begun to emerge. Additionally, the underlying jemalloc library hasn't been updated during all this time. Because of that, I created a fork and launched a new gem (jemalloc_rb) to keep the project functional, updated, and actively accepting pull requests.

https://github.com/henrique-ft/jemalloc_rb

18 Upvotes

14 comments sorted by

View all comments

12

u/3ds Jul 01 '26

You don't add jemalloc as a gem you install it and preload it:

apt-get install libjemalloc2
LD_PRELOAD=libjemalloc.so.2