From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Using the ImageMagick backend seems to leak memory Date: Tue, 11 Jan 2011 18:43:35 +0100 Message-ID: <87zkr7nxo8.fsf@member.fsf.org> References: <87sjx6zczl.fsf@member.fsf.org> <30611405.post@talk.nabble.com> <874o9l86eb.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294767885 8267 80.91.229.12 (11 Jan 2011 17:44:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 17:44:45 +0000 (UTC) Cc: Emacs-devel@gnu.org, Jashy , Miles Bader To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 11 18:44:39 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PciGn-0003VD-Kh for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 18:44:33 +0100 Original-Received: from localhost ([127.0.0.1]:46189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PciGn-0008ML-2z for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 12:44:33 -0500 Original-Received: from [140.186.70.92] (port=41895 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PciGJ-00088r-3O for Emacs-devel@gnu.org; Tue, 11 Jan 2011 12:44:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PciFu-0006p9-OW for Emacs-devel@gnu.org; Tue, 11 Jan 2011 12:44:02 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:17770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PciFu-0006os-Jj; Tue, 11 Jan 2011 12:43:38 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 4799478017C0; Tue, 11 Jan 2011 18:43:37 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31535-09; Tue, 11 Jan 2011 18:43:36 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 5A44878017C1; Tue, 11 Jan 2011 18:43:36 +0100 (CET) In-Reply-To: (joakim@verona.se's message of "Tue, 11 Jan 2011 15:17:06 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134448 Archived-At: joakim@verona.se writes: >> ClearMagickWand() clears resources associated with the wand. >> The format of the ClearMagickWand method is: >> >> void ClearMagickWand(MagickWand *wand) >> >> A description of each parameter follows: >> wand >> the magick wand. >> >> In the emacs sources, that function's never called. So that's >> probably the source of the leak. > > Hmm. We can try. Andreas already added DestroyMagickWand() calls that imply clearing, and I locally added MagickWandTerminus() calls. Right now, I presume the leak is not on the IM side. Your patch in the other mail (I'll try it later) seems to support that guess. > Anyway i asked the IM team: > http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=17819 > > Some other things: > - Do you see the issue only when scaling? No, always. > - Only with PNG? Or also JPG? I tested with PNG and TIF, and both have the problem. Bye, Tassilo