bugfix: boehm GC improvements
This commit is contained in:
parent
4de5b82fdc
commit
42dad650e0
1 changed files with 4 additions and 4 deletions
|
|
@ -96,6 +96,10 @@ when defined(boehmgc):
|
||||||
## Return the total number of bytes allocated in this process.
|
## Return the total number of bytes allocated in this process.
|
||||||
## Never decreases.
|
## Never decreases.
|
||||||
|
|
||||||
|
proc allocAtomic(size: int): pointer =
|
||||||
|
result = boehmAllocAtomic(size)
|
||||||
|
zeroMem(result, size)
|
||||||
|
|
||||||
when not defined(useNimRtl):
|
when not defined(useNimRtl):
|
||||||
|
|
||||||
proc alloc(size: int): pointer =
|
proc alloc(size: int): pointer =
|
||||||
|
|
@ -109,10 +113,6 @@ when defined(boehmgc):
|
||||||
if result == nil: raiseOutOfMem()
|
if result == nil: raiseOutOfMem()
|
||||||
proc dealloc(p: Pointer) = boehmDealloc(p)
|
proc dealloc(p: Pointer) = boehmDealloc(p)
|
||||||
|
|
||||||
proc allocAtomic(size: int): pointer =
|
|
||||||
result = boehmAllocAtomic(size)
|
|
||||||
zeroMem(result, size)
|
|
||||||
|
|
||||||
proc allocShared(size: int): pointer =
|
proc allocShared(size: int): pointer =
|
||||||
result = boehmAlloc(size)
|
result = boehmAlloc(size)
|
||||||
if result == nil: raiseOutOfMem()
|
if result == nil: raiseOutOfMem()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue