Valgrind Support for MonoTouch
Most of the time we talk about static analysis tools, but dynamic analysis tools can be even more important when dealing with memory and threading issues. This is why instrumentation frameworks such as Valgrind are so important.
Starting with MonoTouch 5.4, developers can now use Valgrind to debug iOS-based applications. Valgrind 3.7.0 or later is recommended and it needs to be compiled with the flags “--enable-only32bit” and “--prefix=/usr/local”.
Valgrind comes with several tools out of the box:
- Memory error detector
- Two thread error detectors
- Cache and branch-prediction profiler
- Call-graph generating cache and branch-prediction profiler
- Heap profiler
Since this is a framework, developers occasionally create new Valgrind-based tools and variants.
Rolf Bjarne Kvinge warns that Valgrind can produce a lot of noise. The messages you need to watch for are “Invalid read of size X” and “Invalid write of size X”.
Educational Content
Large-Scale Continuous Testing in the Cloud
John Penix May 24, 2013
Managing Build Jobs for Continuous Delivery
Martin Peston May 24, 2013
Clojure in the Field
Stuart Halloway May 23, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think