summary refs log tree commit diff stats
path: root/tests/realtimeGC/shared.nim
diff options
context:
space:
mode:
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
-