How do you set the value of this environment variable in Mac OSX? I tried creating an environment.txt file in my Xamarin.Android project with a build action of AndroidEnvironmen
These items need to be on a single line with commas seperating the parameters. i.e. MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=128m,soft-heap-limit=512m,major=marksweep-conc
This will be picked up via the following code:
if (lineToWrite.StartsWith ("MONO_GC_PARAMS=", StringComparison.Ordinal))
haveMonoGCParams = true;
You should be able to set this item if you have the Use the concurrent garbage collector (Experimental)
enabled in your project settings. This definition will be added to your .csproj
:
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
This will set the following parameter to Mono:
if (!haveMonoGCParams) {
if (EnableSGenConcurrent)
environment.WriteLine ("MONO_GC_PARAMS=major=marksweep-conc");
else
environment.WriteLine ("MONO_GC_PARAMS=major=marksweep");
}
Source
However I believe only two options are available via this logic. Either marksweep
or marksweep-conc
.