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 WAA17636; Fri, 14 Nov 2003 22:36:57 +0100 (MET) 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 WAA17302 for ; Fri, 14 Nov 2003 22:36:56 +0100 (MET) Received: from cmailm4.svr.pol.co.uk (cmailm4.svr.pol.co.uk [195.92.193.211]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAELat103028 for ; Fri, 14 Nov 2003 22:36:55 +0100 (MET) Received: from modem-1082.arcanine.dialup.pol.co.uk ([217.135.25.58]) by cmailm4.svr.pol.co.uk with esmtp (Exim 4.14) id 1AKlcc-00006p-Bc for caml-list@inria.fr; Fri, 14 Nov 2003 21:36:54 +0000 Date: Fri, 14 Nov 2003 21:36:34 +0000 (GMT) From: John J Lee X-X-Sender: john@alice To: caml-list@inria.fr Subject: Re: [Caml-list] GC and file descriptors In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 profile:98 descriptors:01 descriptors:01 nov:01 nov:01 objects:02 o'caml:02 o'caml:02 wrote:03 wrote:03 allocate:03 data:03 lee:94 uses:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 14 Nov 2003, Brian Hurt wrote: > On Fri, 14 Nov 2003, Eric Dahlman wrote: [...] > > file descriptors are closed to the GC profile of your program. If you > > only have 10's or 100's of file descriptors available it would be very > > easy to use them all up in a tight loop which did not allocate much memory. [...] > This is easy enough to work around- have the file open try a GC if the > file open fails. Alternatively, you could simply require programs that [...] File descriptors can be a globally limited resource, though, can't they? If your program uses them all up, other programs can't get one either. Also, does O'Caml *always* GC objects? If they're un-GC-ed at time of program exit, will they still be GC-ed, or does O'Caml just leave it to the OS to clean up in that case? If it leaves it to the OS, files could be left open, and I'm not sure it's guaranteed that having files open for writing at program exit won't cause data loss. John ------------------- 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