From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBVFXTii017222 for ; Sat, 31 Dec 2011 16:33:29 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArkBAFAq/07RVdi2kGdsb2JhbABDrEwIIgEBAQEJCQ0HFAQhgXIBAQEDARICJj8FCwtGNAEFARw7h1iYEgqcFYh1gjdjBIg3jEuFT4guPYQY X-IronPort-AV: E=Sophos;i="4.71,436,1320620400"; d="scan'208";a="137370578" Received: from mail-qy0-f182.google.com ([209.85.216.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 31 Dec 2011 16:33:23 +0100 Received: by qcse13 with SMTP id e13so12218533qcs.27 for ; Sat, 31 Dec 2011 07:33:22 -0800 (PST) Received: by 10.229.137.21 with SMTP id u21mr15949224qct.23.1325345602558; Sat, 31 Dec 2011 07:33:22 -0800 (PST) Received: from [192.168.1.6] (66-189-25-86.dhcp.oxfr.ma.charter.com. [66.189.25.86]) by mx.google.com with ESMTPS id r10sm79775490qaz.7.2011.12.31.07.33.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 31 Dec 2011 07:33:21 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: orbitz@ezabel.com In-Reply-To: Date: Sat, 31 Dec 2011 10:33:19 -0500 Cc: Caml List Message-Id: References: <96F225D0-B458-4E25-BE34-3976989984B2@ezabel.com> To: david.baelde@ens-lyon.org X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pBVFXTii017222 Subject: Re: [Caml-list] Understanding usage by the runtime Being on the C side is not even something I had considered. In this case, I think the only piece of code not part of the Ocaml RTS that is talking to C is Lwt. It is possible that there is a memory leak in there somewhere. The upside, though, is there seems to be some residue of it in the Ocaml side. My heap numbers given earlier are ~65megs which is significantly larger than it should be, so I might be able to track it down from the Ocaml side. Thank you for the suggestion of ocaml-memprof. /M On Dec 31, 2011, at 4:11 AM, David Baelde wrote: > Hi, > > My thoughts are not so fresh on that topic but, seeing the figures, it > could very well be that your memory leak is on the C side. Memory > allocated using malloc in C to Caml bindings won't show up in the Gc > info. > > By the way, if you're sure that the leak is on the OCaml side, you > might be interested in ocaml-memprof. It's a patch by Fabrice Le > Fessant to get precise info about what kind of object is allocated by > the Gc over time. We've been able to use it a while ago on liquidsoap, > after Samuel Mimram adapted it for Ocaml 3.10 (you can find the > updated patch on his page). > > Hope this helps, > > David