Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2005-10-14 (10:10)
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?


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -