caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: orbitz@ezabel.com
To: david.baelde@ens-lyon.org
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Understanding usage by the runtime
Date: Sat, 31 Dec 2011 10:33:19 -0500	[thread overview]
Message-ID: <EED65A08-B24F-42CD-B4D6-4E30667EC6CA@ezabel.com> (raw)
In-Reply-To: <CAFqqUFEO5Vxf0jWxSEbDjXY-qE_G2XsOA0uZj47jTt4NMkeBPA@mail.gmail.com>

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



  reply	other threads:[~2011-12-31 15:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30 23:45 orbitz
2011-12-31  9:11 ` David Baelde
2011-12-31 15:33   ` orbitz [this message]
2012-01-01 12:44     ` Richard W.M. Jones
2012-01-04 18:03       ` Damien Doligez
2012-01-04 18:48         ` Adrien
2012-01-04 19:37           ` John Carr
2012-01-07  5:43       ` orbitz
2012-01-08 18:45         ` Richard W.M. Jones
2012-01-08 19:00           ` Richard W.M. Jones
2012-01-08 22:33             ` Török Edwin
2012-01-09 14:31               ` Richard W.M. Jones
2012-01-09 21:07                 ` Richard W.M. Jones
2012-01-08 22:50           ` orbitz
2012-01-08 23:02             ` Richard W.M. Jones
2012-01-08 23:26               ` orbitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EED65A08-B24F-42CD-B4D6-4E30667EC6CA@ezabel.com \
    --to=orbitz@ezabel.com \
    --cc=caml-list@inria.fr \
    --cc=david.baelde@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).