BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Valgrind Support for MonoTouch

| by Jonathan Allen on Oct 06, 2012. Estimated reading time: less than one minute |

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

Rate this Article

Adoption Stage
Style

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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT