From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA08725; Tue, 4 May 2004 11:31:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA08462 for ; Tue, 4 May 2004 11:31:08 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i449V7EV016280 for ; Tue, 4 May 2004 11:31:07 +0200 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1BKwGX-0006nX-00; Tue, 04 May 2004 10:31:05 +0100 Date: Tue, 4 May 2004 10:31:05 +0100 To: Henri DF Cc: caml-list@inria.fr Subject: Re: [Caml-list] file descriptor leaks? Message-ID: <20040504093105.GN4559@redhat.com> References: <20040504074648.GA29829@bourg.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce with ID 409762DB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 descriptor:01 2004:99 footprints:01 giants:99 asynchronous:01 ltd:98 ocaml:01 garbage:01 descriptors:01 0200,:01 collector:02 leaks:02 henri:03 heap:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, May 04, 2004 at 11:15:44AM +0200, Henri DF wrote: > Calls to read_file open the file but don't close it. Because OCaml > uses a > full garbage collector chan isn't collected until some (unknown, > asynchronous) time later when the minor heap becomes full. This means that > open file descriptors build up waiting to be collected in one go. If files > is a long list, then this code is likely to fail when the OS limit on the > number of open files is reached. > Yes, I think this part of the tutorial is wrong. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment If I have not seen as far as others, it is because I have been standing in the footprints of giants. -- from Usenet ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners