caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: John Lepikhin <john@ispsystem.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: memory usage
Date: Mon, 12 Jan 2009 11:41:27 +0000	[thread overview]
Message-ID: <20090112114127.GA1568@annexia.org> (raw)
In-Reply-To: <1231759695.4376.55.camel@john-laptop>

On Mon, Jan 12, 2009 at 07:28:15PM +0800, John Lepikhin wrote:
> > To get real memory used, (Sys.word_size * live_word / 8). Do you use
> > out-of-heap datastructure that can use memory ? (malloc-ed
> > datastructure).
> 
> The only specific module is ocaml-fd (send file descriptors over pipes).

What version of OCaml is this?

I had a look at the source for ocaml-fd and it doesn't seem like it
should leak memory.  Certainly if there is a memory leak, it would be
a subtle one.

> I have suspicion on it, but as I said before, 90% of process memory is
> filled with specific text data, which is got inside threads and sent to
> socket using Unix.write. This data doesn't look like file
> descriptors :-)
> All other modules are from distribution (Unix, String, Mutex, Threads).

It does seem very unlikely that Unix.write would be a problem -- it's
a very commonly used function.

I'm afraid to say that you'll have to post a short reproducer here
before I can look at this further ...

> I heard about ocaml-memprof patch. Will it help here?

I haven't used it.  Seems like you have to patch the compiler.

If you suspect a problem in a C binding somewhere, then a quicker
approach would probably be to run the program using valgrind.

Rich.

-- 
Richard Jones
Red Hat


  reply	other threads:[~2009-01-12 11:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12  7:41 John Lepikhin
2009-01-12  8:39 ` [Caml-list] " Richard Jones
2009-01-12  9:14   ` John Lepikhin
2009-01-12 10:45     ` Sylvain Le Gall
2009-01-12 11:28       ` [Caml-list] " John Lepikhin
2009-01-12 11:41         ` Richard Jones [this message]
2009-01-12 15:03           ` John Lepikhin
2009-01-12 19:55             ` Richard Jones
2009-01-12 17:56           ` John Lepikhin
2009-01-12 20:12             ` Richard Jones
2009-01-12 21:34               ` John Lepikhin
2009-01-12 22:01                 ` Richard Jones
2009-01-13 16:00                   ` John Lepikhin
     [not found] ` <20090112114837.GB18405@janestcapital.com>
2009-01-12 15:05   ` [Caml-list] " John Lepikhin
2009-01-12 16:29 ` Florian Hars
2009-01-12 16:44   ` John Lepikhin
2009-01-12 17:55     ` Sylvain Le Gall
2009-01-12 18:01       ` [Caml-list] " John Lepikhin
2009-01-12 18:26         ` Sylvain Le Gall

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=20090112114127.GA1568@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=john@ispsystem.com \
    /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).