On Tuesday 05 May 2009 15:39:21 Sylvain Le Gall wrote:
> Hello,
>
> On 05-05-2009, Christoph Bauer <christoph.bauer@lmsintl.com> wrote:
> > Hi,
> >
> > what is the best option to do memory profiling with ocaml?
> > Is there a patch of ocaml-memprof for 3.11.0? What about
> > objsize?
>
> I use a more simple approach (though I have used objsize to estimate
> some datastructure size, but only in the toplevel): GC allocation rate.
>
> You can override a little ocaml-benchmark to measure the allocation rate
> of the GC. This gives you a pretty good understanding on the fact you
> are allocating too much or not.
FWIW, I automated the same approach using camlp4 and intend to write it up in
the OCaml Journal. The results were quite good although run-time performance
was seriously degraded (~50x slower) and it would have been nice to visualize
the results in an IDE.
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e