Only zero strings when necessary.

This removes the zeroing when the string is subsequently overwritten by
a memcpy anyway.
This commit is contained in:
def 2015-03-04 01:48:09 +01:00
commit f5968c7946
2 changed files with 25 additions and 14 deletions

View file

@ -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")