„Google“ grupės nebepalaiko naujų „Usenet“ įrašų ar prenumeratų. Istorinį turinį galima peržiūrėti.

[Caml-list] debugging memory leaks

87 peržiūros
Praleisti ir pereiti prie pirmo neskaityto pranešimo

Chris Waterson

neskaityta,
2007-11-12 00:56:462007-11-12
kam: caml...@yquem.inria.fr
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?

I've tried "valgrind" on a natively-compiled executable, but all the
"real" allocations are hidden in the Caml heap, so it's not very useful.

Any recommendations would be warmly welcomed. Thanks in advance...

chris

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Pierre Etchemaïté

neskaityta,
2007-11-12 02:54:122007-11-12
kam: caml...@yquem.inria.fr
Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson <wate...@maubi.net> a écrit :

> 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

Chris Waterson

neskaityta,
2007-11-12 13:08:172007-11-12
kam: caml...@yquem.inria.fr
On Nov 11, 2007, at 11:53 PM, Pierre Etchemaďté wrote:

> Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson
> <wate...@maubi.net> a écrit :
>
>> 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
places, but this is exactly what I needed.

Thanks a ton!

chris

Fabrice Le Fessant

neskaityta,
2007-11-12 15:53:542007-11-12
kam: Pierre Etchemaïté, caml...@yquem.inria.fr
Interesting, I did a patch in 2004, called ocaml-memprof for
ocaml-3.07,but there is not a single reference/credit to it on this
page... Given the inheritance, the maintainer should be careful to
keep the original author's name.

- Fabrice Le Fesasnt
ASAP Project, INRIA Saclay

Samuel Mimram

neskaityta,
2007-11-12 18:02:372007-11-12
kam: Fabrice Le Fessant, caml...@yquem.inria.fr
Hi,

Since I put the patch on my webpage I owe you an apology. If I remember
well, I got the link on IRC while having issues with memory and the only
thing I did was to resolve the conflicts generated by diff. I put it on
the net because it was hard to find and apparently it was useful to
other people. I'm correcting the credits right now.

Regards,

Samuel.

warrensomebody

neskaityta,
2010-01-28 23:34:252010-01-28
kam: caml...@yquem.inria.fr

I know this is an old thread, but I have revised the memprof patch to work
with ocaml-3.11.2. Please let me know if there is a maintainer who would
like to look this over and/or distribute it. Otherwise, I'll put it up on
github or google code. Thanks,

Warren

--
Warren Harris
war...@metaweb.com
Metaweb Technologies
http://www.freebase.com - An open database of the world’s information.


Samuel Mimram-2 wrote:
>
> Hi,
>
> Since I put the patch on my webpage I owe you an apology. If I remember
> well, I got the link on IRC while having issues with memory and the only
> thing I did was to resolve the conflicts generated by diff. I put it on
> the net because it was hard to find and apparently it was useful to
> other people. I'm correcting the credits right now.
>
> Regards,
>
> Samuel.
>
>
> Fabrice Le Fessant wrote:
>> Interesting, I did a patch in 2004, called ocaml-memprof for
>> ocaml-3.07,but there is not a single reference/credit to it on this
>> page... Given the inheritance, the maintainer should be careful to
>> keep the original author's name.
>>
>> - Fabrice Le Fesasnt
>> ASAP Project, INRIA Saclay
>>

>> On Nov 12, 2007 8:53 AM, Pierre Etchemaïté <petc...@concept-micro.com>

--
View this message in context: http://old.nabble.com/debugging-memory-leaks-tp13700286p27366754.html
Sent from the Caml Discuss2 mailing list archive at Nabble.com.

Richard Jones

neskaityta,
2010-02-02 04:00:272010-02-02
kam: warrensomebody, caml...@yquem.inria.fr
On Thu, Jan 28, 2010 at 08:34:13PM -0800, warrensomebody wrote:
>
> I know this is an old thread, but I have revised the memprof patch to work
> with ocaml-3.11.2. Please let me know if there is a maintainer who would
> like to look this over and/or distribute it. Otherwise, I'll put it up on
> github or google code. Thanks,

I think something like github / google code is a very good idea, then
someone can pick it up at a later date when they need it.

Rich.

--
Richard Jones
Red Hat

Sylvain Le Gall

neskaityta,
2010-02-02 05:29:352010-02-02
kam: caml...@inria.fr
On 29-01-2010, warrensomebody <warrens...@gmail.com> wrote:
>
> I know this is an old thread, but I have revised the memprof patch to work
> with ocaml-3.11.2. Please let me know if there is a maintainer who would
> like to look this over and/or distribute it. Otherwise, I'll put it up on
> github or google code. Thanks,
>

You could consider, putting your code on
http://forge.ocamlcore.org

This is probably the place where it will have the best visibility for
other OCaml developers.

Regards
Sylvain Le Gall

0 naujų pranešimų