From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 61E80BC69 for ; Mon, 12 Nov 2007 19:07:47 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FANckOEdLAQv9/2dsb2JhbACBWw X-IronPort-AV: E=Sophos;i="4.21,406,1188770400"; d="scan'208";a="19198306" Received: from adsl-75-1-11-253.dsl.scrm01.sbcglobal.net (HELO lumpy.maubi.net) ([75.1.11.253]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Nov 2007 19:07:46 +0100 Received: from [192.168.1.15] ([75.1.11.254]) by lumpy.maubi.net (8.13.6/8.13.6) with ESMTP id lACI4bPM022297 for ; Mon, 12 Nov 2007 10:04:37 -0800 (PST) (envelope-from waterson@maubi.net) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <20071112085325.01abdcf3.petchema@concept-micro.com> References: <86183D4E-184A-4F26-84F9-93411D070B38@maubi.net> <20071112085325.01abdcf3.petchema@concept-micro.com> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Chris Waterson Subject: Re: [Caml-list] debugging memory leaks Date: Mon, 12 Nov 2007 10:07:34 -0800 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.752.3) X-Spam: no; 0.00; ocaml:01 minimally:01 compiler:01 ocaml:01 ocaml-:01 2007,:98 wrote:01 heap:01 pps:01 pps:01 caml-list:01 enumerate:01 jussieu:01 jussieu:01 pierre:02 On Nov 11, 2007, at 11:53 PM, Pierre Etchema=EFt=E9 wrote: > Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson =20 > a =E9crit : > >> I have a fairly substantial OCaml application that leaks memory. >> What tools or techniques do people use to track down memory leaks? >> Minimally, is there a way to enumerate the live objects in the heap? > > There's ocaml-memprof, a compiler patch that adds memory profiling > features to ocaml programs; > > Latest update of the patch itself, as far as I know: > http://www.pps.jussieu.fr/~smimram/docs/ocaml-3.09.3-memprof.patch > > Readme: > http://www.pps.jussieu.fr/~smimram/docs/README.memprof Wow. This is fantastic! I had to hack the patch a bit since I'm using objects in a handful of =20= places, but this is exactly what I needed. Thanks a ton! chris