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 VAA10714; Thu, 5 Dec 2002 21:31:17 +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 VAA09795 for ; Thu, 5 Dec 2002 21:31:16 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from kraid.nerim.net (kraid.nerim.net [62.4.16.95]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gB5KVG105987 for ; Thu, 5 Dec 2002 21:31:16 +0100 (MET) Received: from hector.lesours (lesours.starynkevitch.net [80.65.224.217]) by kraid.nerim.net (Postfix) with ESMTP id A080940F38; Thu, 5 Dec 2002 21:20:22 +0100 (CET) Received: from basile by hector.lesours with local (Exim 3.36 #1 (Debian)) id 18K2eR-0002iR-00; Thu, 05 Dec 2002 21:31:15 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15855.46993.822199.934318@hector.lesours> Date: Thu, 5 Dec 2002 21:31:13 +0100 To: David Brown Cc: Caml List Subject: [Caml-list] Memory leak with native code. In-Reply-To: <20021205184846.GA30014@opus.davidb.org> References: <20021205184846.GA30014@opus.davidb.org> X-Mailer: VM 7.07 under Emacs 21.2.2 From: Basile STARYNKEVITCH Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "David" == David Brown writes: David> I have a fairly complex program that has numerous callbacks David> between Ocaml, C and back to Ocaml (I'm using Debian's David> 3.06). David> If I compile my program byte-code, it works well. David> However, if I compile it native, it seems to leak memory, David> just consuming more and more memory as it runs. I assume your plateform is x86 on Debian. Because of the small number of registers, tail-recursion is limited to 5 arguments (if my memory serves me well). For more arguments, a tail-rec is not a loop on x86. Perhaps this could be your problem (just a guess, I encountered it several years ago and reported to the mailing list). Then you might merge several arguments into a tuple or record. Or switch to plateform with more registers! Just a wild guess! The Caml team will confirm (or infirm) it. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet alias: basiletunesorg 8, rue de la Faïencerie, 92340 Bourg La Reine, France ------------------- 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