OCaml Memory Profiler — Beta

Non-intrusive memory profiler for OCaml applications

  • Detect and trace memory leaks
  • No need to instrument your code
  • Performance and memory behavior are unchanged
  • Visualise with an intuitive web interface

  • See examples

Online version

Value counts and statistics are gathered, then processed for visualisation on our server. It's free!

Commercial Version

Off-line visualisation, finer-grained tracing, additional features and support from experts are all available in our commercial package.


Main Features

Easy to use
No changes to your application is required, just compile using our extended compiler, provided as an OPAM switch for convenience. Then run through ocp-memprof to gather statistics and analyze its memory behavior.
Automatic or manual, your choice
Memory snapshots can be generated at every major garbage collection, on user demand (by sending a specific signal to the application) or on application demand (by calling a specific function).
Use in production
Since memory profiling by snapshots has little impact on performance, and none on memory consumption, you can profile an application in production, asking for a snapshot only when the memory usage shows a problem that ocp-memprof could help understand.


No 32-bit support
For now, memory profiling is only supported on 64 bits platforms; if you are interested in 32 bit support, please contact us to discuss your motivations.


TypeRex is a suite of development tools for OCaml that OCamlPro is actively developing. Many of these tools are free and open-source (ocp-indent, ocp-index, ocp-build, opam-manager, etc) and funded by our customers. ocp-memprof is part of the larger set of tools of TypeRex that are only available as open-source software for our TypeRex Pro customers. More memory profiling tools (ocp-allocprof and ocp-gcprof) are still under active development, and should be available soon.