On Sep 21, 2011, at 3:26 PM, Kevin Galligan wrote:
> 1) Is this possible?  Specifically, starting up and calling into a mono 
> runtime on Android or iOS (and possibly windows phone in the future, although 
> you might simply able to use a library there)

Mono won't run on WP7 (nor native code of any kind), but Mono is on iOS via 
MonoTouch, and on Android via Mono for Android.

Yes, you can embed the Mono runtime in your app, and either call into it from 
native code (e.g. Objective-C invoking a selector on a C# type, or Java 
invoking a C# method), or have C# invoke native code (allowing native UI in C# 
on both platforms), There are some limitations and restrictions here 
(particularly on Android), but cross-language interop is supported on both 
platforms.

> 2) What kind of overhead does the mono runtime have?  How much memory? 
> Probably a stupid question, as the project would be dead in the water
> if it didn't run well.

There are various forms of overhead, not all of which have been quantified.

In terms of distribution, Mono adds a minimum of ~4MB to the package size on 
both MonoTouch and Mono for Android, t hough this is highly variable and 
depends upon what Base Class Library types and members you use.

For execution overhead, it's context dependent: managed->managed calls will be 
fastest (with potential JIT inlining), while managed->native and 
native->managed will be slower. How important the slowdown is depends upon your 
app, and we haven't done any specific timing, so we can't provide any figures 
to help here.

For memory overhead, we JIT everything (which adds some memory pressure), but 
historically it hasn't been problematic.

 - Jon

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to