Permalink
Browse files

revert to old GC; use --gc:v2 to activate the new GC

  • Loading branch information...
1 parent fcef03e commit 16808f2930df43b2fc0a6b3729ccb8ff4c88b2cd @Araq Araq committed Jan 31, 2013
Showing with 1,047 additions and 1,149 deletions.
  1. +9 −8 compiler/main.nim
  2. +4 −3 compiler/nimrod.nim
  3. +291 −743 lib/system/gc.nim
  4. +724 −382 lib/system/{oldgc.nim → gc2.nim}
  5. +3 −3 lib/system/mmdisp.nim
  6. +16 −10 lib/system/sysstr.nim
View
@@ -427,14 +427,15 @@ proc resetMemory =
# XXX: detect config reloading (implement as error/require restart)
# XXX: options are appended (they will accumulate over time)
# vis = visimpl
- gcDebugging = true
- echo "COLLECT 1"
- GC_fullCollect()
- echo "COLLECT 2"
- GC_fullCollect()
- echo "COLLECT 3"
- GC_fullCollect()
- echo GC_getStatistics()
+ when compileOption("gc", "v2"):
+ gcDebugging = true
+ echo "COLLECT 1"
+ GC_fullCollect()
+ echo "COLLECT 2"
+ GC_fullCollect()
+ echo "COLLECT 3"
+ GC_fullCollect()
+ echo GC_getStatistics()
const
SimiluateCaasMemReset = false
View
@@ -69,11 +69,12 @@ proc HandleCmdLine() =
changeFileExt(gProjectFull, exeExt).prependCurDir)
execExternalProgram(ex & ' ' & service.arguments)
-#GC_disableMarkAndSweep()
-
when defined(GC_setMaxPause):
GC_setMaxPause 2_000
-GC_disableMarkAndSweep()
+
+when compileOption("gc", "v2"):
+ # the new correct mark&sweet collector is too slow :-/
+ GC_disableMarkAndSweep()
condsyms.InitDefines()
HandleCmdLine()
quit(options.gExitcode)
Oops, something went wrong.

0 comments on commit 16808f2

Please sign in to comment.