From: Jeremy Bopp Date: 2010-12-11T02:07:11+09:00 Subject: Re: Manual Memory Management and Automatic Garbage Collection On 12/10/2010 10:58 AM, Tridib Bandopadhyay wrote: > Jeremy Bopp wrote in post #967674: >> Another suggestion would be to pick up a template library such as erb >> and use that to process some large template files with random data >> repeatedly. That should hopefully cause some memory growth with >> something more than simple strings. >> > > Sorry..I didn't understand this part.. Use the ERB class: http://rdoc.info/docs/ruby-stdlib/1.8.7/ERB Create a handful of files to be used as templates of the form required for that class. Ensure that the templates have data you can replace. Process the templates with generated data in a loop. We're basically making what should hopefully be a non-trivial form of the while loop you've been using that prints a string with a number embedded. Hopefully, this will allocate a sufficient number of objects in a way that will eventually trigger garbage collection. If it doesn't work, get creative and try to figure out some other way to lots of non-trivial objects. -Jeremy