BT

InfoQ Homepage News A New Garbage Collector and Memory Profiler for iOS/MonoTouch

A New Garbage Collector and Memory Profiler for iOS/MonoTouch

Bookmarks

MonoTouch for iOS now supports the generational garbage collector SGen. Until recently this was an experimental option only available on the full version of Mono. Along with it comes a Memory Profiler for iOS that it accessible via the MonoDevelop IDE.

The generational garbage collector SGen replaces Mono’s traditional Boehm garbage collector. While it is expected to have better performance, SGen is still hampered by its conservative scanning. In the future SGen is expected to switch to a precise stack marking system which should significantly reduce nursery fragmentation.

The iOS profiler supports two modes, the default being Heap Analysis. In this mode memory snapshots can be taken on demand or by a trigger. The trigger can be set to a certain number of garbage collection cycles or a time-based interval. Standard tools such as comparing snapshots and determining how an object is rooted in memory are included.

Performance Analysis supports statistical sampling and the more accurate but slower enter/leave event logging. Statistical sampling takes snapshots of the application and estimates how fast each method is based on how often it happens to be caught by the sampler. Enter/leave event logging literally records a log entry each time a function is begun or completed. This offers a complete record of where time is being spent, but at a serious performance cost. This mode can also capture the stack traces associated with object allocation.

MonoDevelop 2.8.5 and MonoTouch 5.1.1 are required to use this tool. For the particular project, the debugging, profiling, and the SGen garbage collector options must be enabled.

Rate this Article

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

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

Community comments

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.