integrated realtimegc stuff into testament

This commit is contained in:
Simon Hafner 2015-04-13 22:36:35 -05:00
commit c55f884b5c
7 changed files with 78 additions and 38 deletions

View file

@ -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