[hts-users:01512] Possible memory leakage in HMGenS
- Subject: [hts-users:01512] Possible memory leakage in HMGenS
- From: "Xuchen Yao" <xuchenyao@xxxxxxxxx>
- Date: Wed, 9 Jul 2008 11:44:36 +0800
- Delivered-to: hts-users@xxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=FhSBWsoBIkvgExC86jvZnAVZ5Tnp0MTqo4M7mg37VH0=; b=m0ANzrIFQxMLdslxuOjEFvVJq/9V8mkFfUAA91TyaIDMReMhxadI8r6BpDEJghEgcb elapelB5Wgcox7gvY0Gg2bOehOVe0+q6tFOw6phNmHuRR9b7DTFvXBlYZrUMQG++n2W5 Lip/pg2sI/H44/BI9Mn5rYr4NGzunknI46J1o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=As4vSGF/mWUROEXX1jxHu+tD9kPFy+yH8dorY2K1Rc3EtZHlKE8pkrhyfny62Ayw39 SFkAsn/iXuEHIyDHJmena9KPijVnfQfE3+Ai4J2HiQwJJIUxEfyKHICIvMZyWPE/v5Av UmkR02r4nbcvoC7t0JL2Vh+vMgLcilPhQ8v3c=
Hi Heiga,
At the end of the function DoGenenration() in HMGenS.c:
/* free memory */
Dispose(&gstack, ++utt->o);
ResetGenInfo(genInfo);
I think since utt->o is made by MakeObservation(), it should be first
freed like this:
for (t=utt->T; t>0; t--) {
ResetObservation(&gstack, &utt->o[t], hset->swidth, 0);
}
valgrind doesn't report memory loss whether adding or removing the
above lines. And I'm not sure about this. Could you please check?
With kind regards,
Xuchen
- Follow-Ups
-
- [hts-users:01513] Re: Possible memory leakage in HMGenS, Heiga ZEN (Byung Ha CHUN)