add exported memory size getter functions for MemRegion objects

This commit is contained in:
Hakan Deryal
2016-10-13 19:10:53 +03:00
parent 67b635029d
commit 34865fbbf5

View File

@@ -465,4 +465,10 @@ proc getFreeMem(): int = tlRegion.remaining
proc getTotalMem(): int =
result = tlRegion.totalSize
proc getOccupiedMem*(r: MemRegion): int =
result = r.totalSize - r.remaining
proc getFreeMem*(r: MemRegion): int = r.remaining
proc getTotalMem*(r: MemRegion): int =
result = r.totalSize
proc setStackBottom(theStackBottom: pointer) = discard