summary refs log tree commit diff stats
path: root/tests/realtimeGC/shared.nim
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2015-04-13 22:36:35 -0500
committerSimon Hafner <hafnersimon@gmail.com>2015-04-13 22:36:35 -0500
commitc55f884b5c0ebc0b637138a8de446ba1fd05acdf (patch)
tree0fe74403843327ac380d3fb8a2775b5b74b93371 /tests/realtimeGC/shared.nim
parentc1d0b2403b3f1c9ca487c362658aefb954ee7d96 (diff)
downloadNim-c55f884b5c0ebc0b637138a8de446ba1fd05acdf.tar.gz
integrated realtimegc stuff into testament
Diffstat (limited to 'tests/realtimeGC/shared.nim')
-rw-r--r--tests/realtimeGC/shared.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/realtimeGC/shared.nim b/tests/realtimeGC/shared.nim
index c8a70e1ee..2d1dd6c3c 100644
--- a/tests/realtimeGC/shared.nim
+++ b/tests/realtimeGC/shared.nim
@@ -4,6 +4,8 @@ discard """
 
 import strutils
 
+# Global state, accessing with threads, no locks. Don't do this at
+# home.
 var gCounter: uint64
 var gTxStatus: bool
 var gRxStatus: bool
@@ -55,7 +57,7 @@ proc count() {.exportc: "count", dynlib.} =
   gCounter += 1
   # echo("gCounter: ", gCounter)
 
-proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
-  echo("Occupied Memmory: ", getOccupiedMem())
+proc checkOccupiedMem() {.exportc: "checkOccupiedMem", dynlib.} =
+  if getOccupiedMem() > 10_000_000:
+    quit 1
   discard
-