From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Using the ImageMagick backend seems to leak memory Date: Tue, 11 Jan 2011 11:59:00 +0100 Message-ID: References: <87sjx6zczl.fsf@member.fsf.org> <30611405.post@talk.nabble.com> <874o9l86eb.fsf@member.fsf.org> <87ipxx2gjl.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294743558 2143 80.91.229.12 (11 Jan 2011 10:59:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 10:59:18 +0000 (UTC) Cc: Emacs-devel@gnu.org, Andreas Schwab , Jashy , Miles Bader To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 11 11:59:14 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 1PcbwX-0005hR-Ms for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 11:59:13 +0100 Original-Received: from localhost ([127.0.0.1]:59272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcbwX-0006ix-Al for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 05:59:13 -0500 Original-Received: from [140.186.70.92] (port=44734 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcbwP-0006ip-R3 for Emacs-devel@gnu.org; Tue, 11 Jan 2011 05:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcbwO-00034t-E4 for Emacs-devel@gnu.org; Tue, 11 Jan 2011 05:59:05 -0500 Original-Received: from batman.blixtvik.net ([87.96.254.3]:59555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcbwO-00034j-8y; Tue, 11 Jan 2011 05:59:04 -0500 Original-Received: from www.verona.se (4-208-96-87.cust.blixtvik.se [87.96.208.4]) by batman.blixtvik.net (Postfix) with ESMTP id 4B4CD7F9320; Tue, 11 Jan 2011 11:59:02 +0100 (CET) Original-Received: from localhost.localdomain (unknown [192.168.201.6]) by www.verona.se (Postfix) with ESMTP id BF7C0961EE9; Tue, 11 Jan 2011 11:59:01 +0100 (CET) In-Reply-To: <87ipxx2gjl.fsf@member.fsf.org> (Tassilo Horn's message of "Mon, 10 Jan 2011 11:34:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:134443 Archived-At: Tassilo Horn writes: > Andreas Schwab writes: > > Hi Andreas, > >>> Looking at the API, there's >>> >>> 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. >> >> DestroyMagickWand should imply ClearMagickWand, IIUC. >> >> I've fixed a few resource leaks, but that did not really help. I just verified that using a dev IM doesnt help. Maybe using Valgrind can help, but it doesnt work with emacs sadly. > > Looking at the code examples at > > http://www.imagemagick.org/api/magick-wand.php > > it seems one must call > > MagickWandTerminus(); > > after destroying the wands. > > Maybe that helps. > > Bye, > Tassilo -- Joakim Verona