H.Yamamoto wrote: > > But I think this is not cause of your problem because ... ([ruby-talk:181563]) > > Received query results 89Mb > String count 901034 > Threshold breaker String (827236) started w/ 73743 ended w/ 900979 > Threshold breaker Table1 47000 started w/ 0 ended w/ 47000 > > Starting GC 89Mb > String count 25041 > Done with GC 82Mb > Threshold breaker String -48704 started w/ 73743 ended w/ 25039 > > ,.. String count was down. If this memory problem happened by one big array (`records` in test_build_mem_usage?) > which was not freed, String count would not be down. > > Can you try similar patch like this? > I commented out your String#capacity call, and ran the script. With the patch on ruby 1.8.4 I get: zdennis@lima:~/source/languages/ruby$ ~/bin/ruby-1.8.4/bin/ruby gc_mem_testing.rb String count = 157 Array count = 6 String count = 800,165 Array count = 7 String count = 800,169 Array count = 7 String count = 800,173 Array count = 7 Zach