diff options
author | Araq <rumpf_a@web.de> | 2012-01-16 00:04:56 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-01-16 00:04:56 +0100 |
commit | 42dad650e036efdc6e76e64ac0e30c4571937a6e (patch) | |
tree | a13a9a20cebe997b7a91138a2d375ddb3a0d2ae8 /lib/system/mmdisp.nim | |
parent | 4de5b82fdca41204afe0e5405b27d325bb9cf164 (diff) | |
download | Nim-42dad650e036efdc6e76e64ac0e30c4571937a6e.tar.gz |
bugfix: boehm GC improvements
Diffstat (limited to 'lib/system/mmdisp.nim')
-rwxr-xr-x | lib/system/mmdisp.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim index 33df8e89a..dc4caee48 100755 --- a/lib/system/mmdisp.nim +++ b/lib/system/mmdisp.nim @@ -96,6 +96,10 @@ when defined(boehmgc): ## Return the total number of bytes allocated in this process. ## Never decreases. + proc allocAtomic(size: int): pointer = + result = boehmAllocAtomic(size) + zeroMem(result, size) + when not defined(useNimRtl): proc alloc(size: int): pointer = @@ -109,10 +113,6 @@ when defined(boehmgc): if result == nil: raiseOutOfMem() proc dealloc(p: Pointer) = boehmDealloc(p) - proc allocAtomic(size: int): pointer = - result = boehmAllocAtomic(size) - zeroMem(result, size) - proc allocShared(size: int): pointer = result = boehmAlloc(size) if result == nil: raiseOutOfMem() |