BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Valgrind Support for MonoTouch

by Jonathan Allen on Oct 06, 2012 |

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”.

Hello stranger!

You need to Register an InfoQ account or 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

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT