gem install jemalloc && bundle exec je ./script/rails s
Clone or download
Latest commit 864fcee Jan 15, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin remove unused libraries Dec 28, 2014
ext/jemalloc v1.0.0 (jemalloc v3.4.0) Sep 23, 2013
lib/jemalloc v1.0.1 Jan 15, 2015
.gitignore fixed path Aug 4, 2012
ChangeLog v1.0.1 Jan 15, 2015
Gemfile v1.0.1 Jan 15, 2015
Gemfile.lock v1.0.1 Jan 15, 2015 Fix typo [skip ci] Feb 19, 2014
Rakefile first commit Aug 4, 2012
jemalloc.gemspec v0.1.5 to fix homepage at gemspec Oct 21, 2012


Instant jemalloc injection into Ruby apps, for better performance and less memory.

Why jemalloc?

Ruby relies on malloc(3) for its internal memory allocation. Using better malloc() implementation will boost your application performance, and supress the memory usage.

jemalloc is a malloc(3) implementation, originally developed by Jason Evans. jemalloc handles small object better than other allocators so usually gives better performance and memory usage to Ruby programs.

Why jemalloc?

Installing jemalloc separately from Ruby is pain in some cases (e.g. Heroku, EngineYard, etc). je gem contains jemalloc itself within a gem, and enables instant jemalloc injection in a really easy way: install je gem, and launch your app with je command.


Install jemalloc gem in your application. For bundler based application, please add the following line into your Gemfile, and and install jemalloc by bundle install.

gem 'jemalloc'


Execute your application with je command, which is contained in je gem. Example command for Rails + bundler application is like follows.

$ bundle exec je ./script/rails s

-v option will let you confirm jemalloc is actually injected.

$ bundle exec je -v ./script/rails s
=> Injecting jemalloc...
=> Booting WEBrick


Currently, this gem works only on Linux and Mac OS X.


BSD-derived License.