enable fragmentation tests

This commit is contained in:
Araq 2017-12-07 17:03:15 +01:00
commit c96e1d0180
2 changed files with 26 additions and 10 deletions

View file

@ -1,7 +1,8 @@
include system/ansi_c
discard """
output: '''occupied ok: true
total ok: true'''
"""
import strutils, data
@ -16,4 +17,11 @@ proc main =
# c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)
main()
echo formatSize getOccupiedMem(), " / ", formatSize getTotalMem()
let occ = getOccupiedMem()
let total = getTotalMem()
# Current values on Win64: 824KiB / 106.191MiB
echo "occupied ok: ", occ < 2 * 1024 * 1024
echo "total ok: ", total < 120 * 1024 * 1024