From d2d717ba12ad3defd29f273c42548db8bcabbeda Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Sat, 13 Sep 2014 22:32:55 +0000
Subject: [PATCH] test/-ext-/string/test_modify_expand.rb: increase limit for
 {je,tc}malloc

In this test, jemalloc and tcmalloc are both more hesitant to
release memory to the kernel than the stock glibc allocator.

Tested on jemalloc 3.6.0 (self-built) and libtcmalloc-minimal 2.0-2
(Debian package) on x86_64-linux
---
 test/-ext-/string/test_modify_expand.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/-ext-/string/test_modify_expand.rb b/test/-ext-/string/test_modify_expand.rb
index 6a18560..1d20db4 100644
--- a/test/-ext-/string/test_modify_expand.rb
+++ b/test/-ext-/string/test_modify_expand.rb
@@ -4,7 +4,8 @@ require_relative '../../ruby/envutil'
 
 class Test_StringModifyExpand < Test::Unit::TestCase
   def test_modify_expand_memory_leak
-    assert_no_memory_leak(["-r-test-/string/string"], <<-PRE, <<-CMD, "rb_str_modify_expand()")
+    assert_no_memory_leak(["-r-test-/string/string"],
+                          <<-PRE, <<-CMD, "rb_str_modify_expand()", limit: 2.5)
       s=Bug::String.new
     PRE
       size = $initial_size
-- 
EW

