Ruby 2.6.5 with Jemalloc

Ruby 2.6.5 with jemalloc

Try:

puts RbConfig::CONFIG['MAINLIBS']

And check for -ljemalloc in the output.

This behavior has changed recently (in 2.6.x, to be precise).

How to check ruby-2.6.3 is using jemalloc ? I installed ruby-2.6.3 as $ rvm install 2.6.3 -C --with-jemalloc

In ruby 2.6.x, you have to check MAINLIBS, like this:

$ irb -rrbconfig
irb(main):004:0> RbConfig::CONFIG['MAINLIBS']
=> "-lz -lpthread -lrt -lrt -ljemalloc -lgmp -ldl -lcrypt -lm "

or, of course, with your one-liner:

$ ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
-lz -lpthread -lrt -lrt -ljemalloc -lgmp -ldl -lcrypt -lm

Rbenv: How to have two or more RUBY_CONFIGURE_OPTS when installing ruby?

You can set multiple options by using double quote.

RUBY_CONFIGURE_OPTS="--with-jemalloc--disable-install-doc --disable-install-doc" rbenv install 2.6.5 -v


Related Topics



Leave a reply



Submit