From: Eric Wong Date: 2014-05-13T03:59:05+00:00 Subject: [ruby-core:62554] Re: [ruby-trunk - Feature #9113] Ship Ruby for Linux with jemalloc out-of-the-box nobu@ruby-lang.org wrote: > "linux-gnu" in "target_os" is substituted by "linux", so your AS_CASE never match. > You should check for libjemalloc availability instead, I think. I used $target, not $target_os. An early version of my patch used $target_os, but I noticed it was a noop so I changed it to use $target. I've tested this with bare "./configure" and also --without-jemalloc. Both work as expected on my GNU/Linux systems. I worry this leads to platform-specific problems on non-GNU/Linux systems. It seems varnish/redis only tries jemalloc on Linux, too. Also, I get one failure on both 32-bit and 64-bit: [1/1] Test_StringModifyExpand#test_modify_expand_memory_leak = 0.02 s 1) Failure: Test_StringModifyExpand#test_modify_expand_memory_leak [/home/ew/ruby/test/-ext-/string/test_modify_expand.rb:7]: rb_str_modify_expand(). size: 14307328 => 31084544.. Expected 2.1726309762381906 to be < 1.5. It looks like certain allocation patterns are worse with jemalloc, but I think real-world apps use less memory.