Version française
Home     About     Download     Resources     Contact us    
Browse thread
Memory usage/ garbage collection question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Memory usage/ garbage collection question
On Fri, Oct 14, 2005 at 04:58:59AM -0500, Seth J. Fogarty wrote:
> I do not see why iterating through a list that consumed a lot of
> memory should (innately) cause you to thrash. What is thrashing?
> access to the disk? Garbage collection?

That's where I'm not really sure, except that it is observably
thrashing.  Since it's a simple iteration, I guess that would
implicate the GC?

> No, because you have bound rows to a name. Now, I believe if rows is
> returned by a function, and is NOT bound by name in that function, it
> can be garbage collected. I.E.

Ah OK ... I'm interested though: why does binding a value to a name
cause problems?  Surely at this level (ocamlopt generated code) there
ought to be no difference between a named value and an unnamed one?

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com