Only zero strings when necessary.
This removes the zeroing when the string is subsequently overwritten by a memcpy anyway.
This commit is contained in:
parent
fa3620be9e
commit
f5968c7946
2 changed files with 25 additions and 14 deletions
|
|
@ -593,7 +593,7 @@ proc addNewObjToZCT(res: PCell, gch: var TGcHeap) {.inline.} =
|
|||
return
|
||||
add(gch.zct, res)
|
||||
|
||||
proc rawNewObj(typ: PNimType, size: int, gch: var TGcHeap, rc1: bool): pointer =
|
||||
proc rawNewObj(typ: PNimType, size: int, gch: var TGcHeap, rc1 = false): pointer =
|
||||
# generates a new object and sets its reference counter to 0
|
||||
acquire(gch)
|
||||
sysAssert(allocInv(gch.region), "rawNewObj begin")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue