From: Matt Armstrong Date: 2002-03-08T05:31:55+09:00 Subject: Re: object size and overhead. Ron Jeffries writes: >>It is 20 bytes. >> >>This jives with my research. A 600,000 element array of zeroes took >>3.5 megs on my machine. A 600,000 element arrays of "" took 15 megs. >>That's a difference of 12,058,624 bytes / 600,000 = 20.098 bytes for >>each extra String object. > > This is much like I would expect. I can't figure out why I was at > 200 meg and climbing with my 100,000 records. Last time I had a runaway ruby process like this, it turned out to be a memory leak in eval. The standard tempfile.rb and delegate.rb both use eval, so a little bit of memory is lost every time you use a Tempfile or create a Delegator instance. As far as I know, this bug hasn't been fixed. Does your code exercise eval heavily? -- matt