Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do "Runtime Trampolines" mean in MonoTouch 6.0.8 Release Notes?

MonoTouch 6.0.8 release notes say:

Runtime Trampolines: It is no longer necessary to manually manage trampolines in the Mono runtime, trampolines are now handled dynamically.

What does this mean? How do you manually manage trampolines anyway?
Do you still need to add compiler flags when you know you're probably going to run out of trampolines?

like image 718
Dan Abramov Avatar asked Dec 19 '12 00:12

Dan Abramov


1 Answers

This means just as the release notes say that Monotouch now figures out how many trampolines to allocate.

To add more trampolines you add compiler flags such as:

-aot "nrgctx-trampolines=4096" -aot "nimt-trampolines=4096" -aot "ntrampolines=4096"

Usually when you were running out of trampolines meant that you were using a lot of generics and interfaces, which are hard to calculate how much memory needs to be allocated for ahead of time (aot). So Xamarin must have found a magic way to do this calculation and allocate the trampolines accordingly. I couldn't find more information about this.

There's a bit more information about trampolines in general in this thread: http://forums.xamarin.com/discussion/503/trampolines-cost and this thread which was prior to the other one: http://lists.ximian.com/pipermail/monotouch/2012-March/008800.html

like image 145
Cheesebaron Avatar answered Nov 05 '22 01:11

Cheesebaron