GC with realtime support

This commit is contained in:
Araq 2012-04-21 03:19:43 +02:00
commit 4aba7421f5
15 changed files with 261 additions and 27 deletions

View file

@ -161,5 +161,8 @@ proc main() =
var elapsed = epochTime() - t
PrintDiagnostics()
echo("Completed in " & $elapsed & "ms. Success!")
when defined(GC_setMaxPause):
GC_setMaxPause 2_000
main()

View file

@ -2,6 +2,9 @@ discard """
outputsub: "no leak: "
"""
when defined(GC_setMaxPause):
GC_setMaxPause 2_000
type
TTestObj = object of TObject
x: string

View file

@ -2,6 +2,9 @@ discard """
outputsub: "no leak: "
"""
when defined(GC_setMaxPause):
GC_setMaxPause 2_000
type
TTestObj = object of TObject
x: string

View file

@ -2,6 +2,9 @@ discard """
outputsub: "no leak: "
"""
when defined(GC_setMaxPause):
GC_setMaxPause 2_000
type
TSomething = object
s: string

View file

@ -122,6 +122,8 @@ proc runGcTests(r: var TResults, options: string) =
template test(filename: expr): stmt =
runSingleTest(r, "tests/gc" / filename, options)
runSingleTest(r, "tests/gc" / filename, options & " -d:release")
runSingleTest(r, "tests/gc" / filename, options &
" -d:release -d:useRealtimeGC")
test "gcbench"
test "gcleak"