diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim index 1e85853d1c..4b01cf4a87 100644 --- a/lib/system/mmdisp.nim +++ b/lib/system/mmdisp.nim @@ -427,7 +427,7 @@ elif defined(nogc) and defined(useMalloc): proc initGC() = discard proc newObj(typ: PNimType, size: int): pointer {.compilerproc.} = - result = alloc(size) + result = alloc0(size) proc newSeq(typ: PNimType, len: int): pointer {.compilerproc.} = result = newObj(typ, addInt(mulInt(len, typ.base.size), GenericSeqSize)) cast[PGenericSeq](result).len = len