Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc78259f

Browse files
committed
Use mono-sgen for /resident server if mono-sgen is being used for the client
The /resident server is being spawned with mono even if mono-when isbeing used for the calling fsc.exe. This change makes the /residentswitch also benefit from SGEN when it is being used.Will ask on the mono list if there is a better way of detecting ifmono-sgen is being used (or even just finding the exact path to themono being used to run the program)
1 parentf6af241 commitc78259f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/fsharp/fscmain.fs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ module FSharpResidentCompiler =
189189
if onWindowsthen
190190
Path.Combine(Path.GetDirectoryName(typeof<Object>.Assembly.Location),@"..\..\..\bin\mono.exe"),false
191191
else
192-
"mono",true
192+
// create some garbage
193+
for iin0..1000do[0.. i]|> ignore
194+
// test if we're using mono-sgen
195+
letusingMonoSGEN=(System.GC.CollectionCount(0)= System.GC.CollectionCount(1))
196+
lettarget=if usingMonoSGENthen"mono"else"mono-sgen"
197+
target,true
193198
| path-> path,false
194199

195200
// e.g. "C:\Program Files\Mono-2.6.1\lib\mono20\mscorlib.dll" --> "C:\Program Files\Mono-2.6.1\bin\mono.exe"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp