mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
add exported memory size getter functions for MemRegion objects
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user