caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Memory usage/ garbage collection question
@ 2005-10-14  9:49 Richard Jones
  2005-10-14 10:02 ` [Caml-list] " skaller
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Richard Jones @ 2005-10-14  9:49 UTC (permalink / raw)
  To: caml-list


I'm trying to optimise a program which is using a large amount of
memory and consequently thrashing.

The core of the program is an iteration over a list of something like
a million elements which consumes about 1/2 gig of RAM.  The iteration
is:

  List.iter (
    fun row ->
      (* put row into database and forget about it *)
  ) rows;
  (* no further references to rows after this *)

This is the stdlib implementation of List.iter.  Should the garbage
collector be able to collect the part of the list which has been
iterated over, during the iteration?  At the moment it doesn't look
like it's doing so.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-14 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14  9:49 Memory usage/ garbage collection question Richard Jones
2005-10-14 10:02 ` [Caml-list] " skaller
2005-10-14 10:08 ` Olivier Andrieu
     [not found] ` <c7ee61120510140258q5b7f393l8e3c2c3d45f49008@mail.gmail.com>
2005-10-14 10:27   ` Richard Jones
2005-10-14 10:51     ` Frederic van der Plancke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).