Don't zeroMem result of boehmAlloc() (#7029)
From the man page: "Unlike the standard implementations of malloc, GC_malloc clears the newly allocated storage. GC_malloc_atomic does not."
This commit is contained in:
parent
464d037c17
commit
9f943dbc8e
1 changed files with 1 additions and 3 deletions
|
|
@ -109,7 +109,6 @@ when defined(boehmgc):
|
|||
if result == nil: raiseOutOfMem()
|
||||
proc alloc0(size: Natural): pointer =
|
||||
result = alloc(size)
|
||||
zeroMem(result, size)
|
||||
proc realloc(p: pointer, newsize: Natural): pointer =
|
||||
result = boehmRealloc(p, newsize)
|
||||
if result == nil: raiseOutOfMem()
|
||||
|
|
@ -119,8 +118,7 @@ when defined(boehmgc):
|
|||
result = boehmAlloc(size)
|
||||
if result == nil: raiseOutOfMem()
|
||||
proc allocShared0(size: Natural): pointer =
|
||||
result = alloc(size)
|
||||
zeroMem(result, size)
|
||||
result = allocShared(size)
|
||||
proc reallocShared(p: pointer, newsize: Natural): pointer =
|
||||
result = boehmRealloc(p, newsize)
|
||||
if result == nil: raiseOutOfMem()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue