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 EAA21965; Wed, 14 Jul 2004 04:36:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA20936 for ; Wed, 14 Jul 2004 04:36:02 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from glow.phpwebhosting.com (glow.phpwebhosting.com [67.18.12.66]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i6E2a0SH026994 for ; Wed, 14 Jul 2004 04:36:01 +0200 Received: (qmail 21959 invoked from network); 14 Jul 2004 02:35:57 -0000 Received: from unknown (HELO sparky) (24.163.170.87) by glow.phpwebhosting.com with SMTP; 14 Jul 2004 02:35:57 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Tom Hawkins Organization: Launchbird Design Systems, Inc. To: caml-list@inria.fr Subject: Re: [Caml-list] Immediate Out_of_memory Date: Tue, 13 Jul 2004 21:33:14 -0500 User-Agent: KMail/1.4.3 References: <200407130910.12206.tom@launchbird.com> <20040713143259.GA22456@yquem.inria.fr> In-Reply-To: <20040713143259.GA22456@yquem.inria.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200407132133.14685.tom@launchbird.com> X-Miltered: at concorde with ID 40F49C10.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 hashtbl:01 cyclic:01 recursion:01 bounded:01 overflows:01 hypothesis:01 recursion:01 raises:01 exception:02 stack:02 stack:02 comparison:02 comparison:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tuesday 13 July 2004 09:32 am, Xavier Leroy wrote: > > After making a few minor changes, my program started raising the > > Out_of_memory exception. The strange thing is it fires a split > > second after the program starts. It happens so fast, 'top' > > doesn't even have a chance to register it on its radar. > > I narrowed it down to a 'Hashtbl.find' application. > > This is very likely due to a structural comparison (via =3D, like > Hashtbl.find does) between cyclic structures. Structural > comparison maintains a recursion stack that is bounded, and raises > Out_of_memory when that stack overflows. With 3.08, you can > confirm this hypothesis by running with OCAMLRUNPARAM set to > 'v=3D63'; structural comparison will print a message if it runs out > of recursion stack. Yes, that's it. Many thanks for 3.08. -Tom ------------------- 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