* debugging memory leaks @ 2007-11-12 5:56 Chris Waterson 2007-11-12 7:53 ` [Caml-list] " Pierre Etchemaïté 0 siblings, 1 reply; 8+ messages in thread From: Chris Waterson @ 2007-11-12 5:56 UTC (permalink / raw) To: caml-list 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2007-11-12 5:56 debugging memory leaks Chris Waterson @ 2007-11-12 7:53 ` Pierre Etchemaïté 2007-11-12 18:07 ` Chris Waterson 2007-11-12 20:53 ` Fabrice Le Fessant 0 siblings, 2 replies; 8+ messages in thread From: Pierre Etchemaïté @ 2007-11-12 7:53 UTC (permalink / raw) To: caml-list Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson <waterson@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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2007-11-12 7:53 ` [Caml-list] " Pierre Etchemaïté @ 2007-11-12 18:07 ` Chris Waterson 2007-11-12 20:53 ` Fabrice Le Fessant 1 sibling, 0 replies; 8+ messages in thread From: Chris Waterson @ 2007-11-12 18:07 UTC (permalink / raw) To: caml-list On Nov 11, 2007, at 11:53 PM, Pierre Etchemaïté wrote: > Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson > <waterson@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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2007-11-12 7:53 ` [Caml-list] " Pierre Etchemaïté 2007-11-12 18:07 ` Chris Waterson @ 2007-11-12 20:53 ` Fabrice Le Fessant 2007-11-12 23:02 ` Samuel Mimram 1 sibling, 1 reply; 8+ messages in thread From: Fabrice Le Fessant @ 2007-11-12 20:53 UTC (permalink / raw) To: Pierre Etchemaïté; +Cc: caml-list 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é <petchema@concept-micro.com> wrote: > Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson <waterson@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 > > > _______________________________________________ > 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 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2007-11-12 20:53 ` Fabrice Le Fessant @ 2007-11-12 23:02 ` Samuel Mimram 2010-01-29 4:34 ` warrensomebody 0 siblings, 1 reply; 8+ messages in thread From: Samuel Mimram @ 2007-11-12 23:02 UTC (permalink / raw) To: Fabrice Le Fessant; +Cc: caml-list 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é <petchema@concept-micro.com> wrote: >> Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson <waterson@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 >> >> >> _______________________________________________ >> 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 >> > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2007-11-12 23:02 ` Samuel Mimram @ 2010-01-29 4:34 ` warrensomebody 2010-02-02 9:00 ` Richard Jones 2010-02-02 10:28 ` Sylvain Le Gall 0 siblings, 2 replies; 8+ messages in thread From: warrensomebody @ 2010-01-29 4:34 UTC (permalink / raw) To: caml-list 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 warren@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é <petchema@concept-micro.com> >> wrote: >>> Le Sun, 11 Nov 2007 21:56:06 -0800, Chris Waterson <waterson@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 >>> >>> >>> _______________________________________________ >>> 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 >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 > > -- 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] debugging memory leaks 2010-01-29 4:34 ` warrensomebody @ 2010-02-02 9:00 ` Richard Jones 2010-02-02 10:28 ` Sylvain Le Gall 1 sibling, 0 replies; 8+ messages in thread From: Richard Jones @ 2010-02-02 9:00 UTC (permalink / raw) To: warrensomebody; +Cc: caml-list 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: debugging memory leaks 2010-01-29 4:34 ` warrensomebody 2010-02-02 9:00 ` Richard Jones @ 2010-02-02 10:28 ` Sylvain Le Gall 1 sibling, 0 replies; 8+ messages in thread From: Sylvain Le Gall @ 2010-02-02 10:28 UTC (permalink / raw) To: caml-list On 29-01-2010, warrensomebody <warrensomebody@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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-02-02 10:29 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-11-12 5:56 debugging memory leaks Chris Waterson 2007-11-12 7:53 ` [Caml-list] " Pierre Etchemaïté 2007-11-12 18:07 ` Chris Waterson 2007-11-12 20:53 ` Fabrice Le Fessant 2007-11-12 23:02 ` Samuel Mimram 2010-01-29 4:34 ` warrensomebody 2010-02-02 9:00 ` Richard Jones 2010-02-02 10:28 ` Sylvain Le Gall
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox