Re: Gimp-Perl memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   From: Sven Neumann <sven@xxxxxxxx>
   Date: Sat, 29 Mar 2008 18:24:59 +0100

   On Wed, 2008-03-26 at 22:11 -0400, Andrei Simion wrote:

   > I run Gimp 2.2 on a Red Hat machine. The Perl scripts delete the images 
   > that are created by using gimp_image_delete. Even so, the swap file is 
   > created and it inflates significantly. For instance, after creating 250 
   > images its size is of 2.7 MB.

   That is not much and all it shows is that the image processing you are
   doing is using more memory than the configured tile-cache-size. I am not
   sure if I understand your problem at all...

   > I would be interested in eliminating the swap file or at least limiting 
   > its size. I think it should resize itself, but this doesn't happen.

   The swap file only resizes itself when tiles at the end of the swap file
   are freed. So you may have to free all tiles before the swap file
   resizes itself to zero. If if doesn't do that, then your script leaks an
   image or a drawable somewhere (or it calls a function that leaks).

Perhaps a better test would be to create 250 images, destroy them, and
repeat multiple times.  If the swap file grows from iteration to
iteration, that suggests a memory leak.  As you point out, simply
deleting some images won't necessarily allow the swap file to resize
itself (unless GIMP actively compressed the swap file, which would be
exceedingly time consuming).

A decent analogy here (and one also creates a lot of confusion) is the
behavior of "free" over time.  A lot of people get confused about why
the amount of free memory reported by the OS decreases over time, and
think that it represents a memory leak, when in fact that isn't the case.

-- 
Robert Krawitz                                     <rlk@xxxxxxxxxxxx>

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf@xxxxxxxxxxxx
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux