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