mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 16:38:33 +00:00
@@ -79,6 +79,7 @@ template withRegion*(r: MemRegion; body: untyped) =
|
||||
try:
|
||||
body
|
||||
finally:
|
||||
r = tlRegion
|
||||
tlRegion = oldRegion
|
||||
|
||||
template inc(p: pointer, s: int) =
|
||||
@@ -464,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