Re: [Gimp-developer] 2.3 Memory usage and leaks
Hi, On Wed, 2007-07-18 at 13:10 -0700, Akkana Peck wrote: > That's a good point! But surprisingly, stripping the gimp-2.3 binary > and all the libraries in lib doesn't make much difference -- the > stripped 2.3 still takes 33M at startup. > > Top showed: > VIRT RES SHR %MEM > gimp 2.356600 24m 10m 13.1 > gimp 2.235984 20M9.8m 11.2 That looks just as expected. Nothing to worry about. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] 2.3 Memory usage and leaks
Sven Neumann writes: > What does gmemusage display? Does it only look at malloc'ed pages or > does it also take code size into account? I'm not sure. I think it's all of the above. > On Fri, 2007-07-13 at 15:47 -0700, Akkana Peck wrote: > > I played around with gmemusage to get a feel for what was going > > on. GIMP 2.3 uses between 33.9 and 35.0 Mb on startup (no images > > loaded, and I don't know why it isn't always the same). For > > comparison, 2.2.13 uses about 13.9 Mb at startup, so it's increased > > by a factor of about 2.5 just for the base app, before images. > > That is most likely because your copy of gimp-2.3 has debugging symbols > while your copy of gimp-2.2 doesn't. I wouldn't be surprised if gimp-2.3 That's a good point! But surprisingly, stripping the gimp-2.3 binary and all the libraries in lib doesn't make much difference -- the stripped 2.3 still takes 33M at startup. Top showed: VIRT RES SHR %MEM gimp 2.356600 24m 10m 13.1 gimp 2.235984 20M9.8m 11.2 I haven't tested in valgrind yet, or with G_SLICE=always-malloc, but I'll do some more experimenting (probably not for a few days ... I have some projects coming due). ...Akkana ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] 2.3 Memory usage and leaks
Hi, On Fri, 2007-07-13 at 15:47 -0700, Akkana Peck wrote: > I played around with gmemusage to get a feel for what was going > on. GIMP 2.3 uses between 33.9 and 35.0 Mb on startup (no images > loaded, and I don't know why it isn't always the same). For > comparison, 2.2.13 uses about 13.9 Mb at startup, so it's increased > by a factor of about 2.5 just for the base app, before images. That is most likely because your copy of gimp-2.3 has debugging symbols while your copy of gimp-2.2 doesn't. I wouldn't be surprised if gimp-2.3 uses a little more memory than gimp-2.2 but the difference should be marginal. > Each time I load an image then close the image window without doing > anything, gimp grows by some variable amount, ranging from half a > Mb to 2Mb (perhaps related to the size of the image). If I do > operations on the image before closing it, these cause it to grow > more: doing a crop and a scale almost always makes it grow 2Mb > even with a relatively small image. I have tested this in valgrind and it doesn't show me any memory leaks. Can you reproduce this with G_SLICE=always-malloc ? Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] 2.3 Memory usage and leaks
Hi, On Fri, 2007-07-13 at 15:47 -0700, Akkana Peck wrote: > I played around with gmemusage to get a feel for what was going > on. GIMP 2.3 uses between 33.9 and 35.0 Mb on startup (no images > loaded, and I don't know why it isn't always the same). For > comparison, 2.2.13 uses about 13.9 Mb at startup, so it's increased > by a factor of about 2.5 just for the base app, before images. What does gmemusage display? Does it only look at malloc'ed pages or does it also take code size into account? > Each time I load an image then close the image window without doing > anything, gimp grows by some variable amount, ranging from half a > Mb to 2Mb (perhaps related to the size of the image). If I do > operations on the image before closing it, these cause it to grow > more: doing a crop and a scale almost always makes it grow 2Mb > even with a relatively small image. That's not a useful measure as it doesn't take memory pools into account. glibc has memory pools and gimp 2.3 also makes heavy use of GSlice. > So my questions are: > > - Is the growth that comes from loading an image, doing operations > on it then closing the window expected? What is this memory being > used for? At least to some extend this is expected. But it shouldn't grow with each image. > - Is anyone concerned about gimp's minimal profile having risen from > 14M to 35M? I would definitely be concerned but since I don't know what gmemusage does and since I don't know anything about the differences between your gimp 2.2 and gimp 2.3 installation, there's not much we can do. If you suspect a memory leak, you should use valgrind to verify that. And you should run gimp with G_SLICE=always-malloc when doing that. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer