On Fri, Jun 08, 2001 at 10:16:20AM -0400, Dan Espen wrote: > Dominik Vogt <fvwm-workers@fvwm.org> writes: > > On Fri, Jun 08, 2001 at 09:06:56AM -0400, Dan Espen wrote: > > > Andrey Panov <[EMAIL PROTECTED]> writes: > > > > > > > > It seems that opening of new window increases fvwm's memory size > > > > by 10-20Kb and memory is not freed after closing of the window. > > > > > > This looks suspicious in add_window.c line 347: > > > > > > static void destroy_icon_font(FvwmWindow *tmp_win) > > > { > > > if (IS_ICON_FONT_LOADED(tmp_win) && !USING_DEFAULT_ICON_FONT(tmp_win) && > > > tmp_win->title_font.font != Scr.DefaultFont.font) > > > { > > > FreeFvwmFont(dpy, &(tmp_win->icon_font)); > > > } > > > SET_ICON_FONT_LOADED(tmp_win, 0); > > > /* Fall back to default font (see comment above). */ > > > tmp_win->icon_font = Scr.DefaultFont; > > > SET_USING_DEFAULT_ICON_FONT(tmp_win, 1); > > > } > > > > > > Try changing title_font to icon_font. > > > I have some work to do and can't check it myself until later. > > > > This could lead to a core dump, but I don't see how this can be a > > memory leak. Fvwm does never load fonts more than once. > > Using multibyte and Adrey's config file I did see a growing fvwm2 and > Purify reported these at termination: > > MLK: 24576 bytes leaked in 8 blocks > * This memory was allocated from: > malloc [rtlib.o] > _XQueryFont [Font.c] > XLoadQueryFont [Font.c] > load_font [XSunOMIF.c] > create_fontset [XSunOMIF.c] > create_oc [XSunOMIF.c] > XCreateOC [OCWrap.c] > XCreateFontSet [FSWrap.c] > GetFontSetOrFixed [GetFont.c:65] > LoadFvwmFont [GetFont.c:106] > setup_icon_font [add_window.c:378] > AddWindow [add_window.c:1307] > HandleMapRequestKeepRaised [events.c:1035] > HandleMapRequest [events.c:999] > DispatchEvent [events.c:2766] > HandleEvents [events.c:2819] > main [fvwm.c:742] > _start [crt1.o] > * Block of 3072 bytes (8 times); last block at 0x324d38 > > I don't normally use icon titles so I might have missed them > in previous tests. Also I'm not sure if leaks at termination > are really leaks, if you are going to exit, theres no point in > freeing things. It does look like there were 8 icon fonts allocated. > Thats close to the number of windows I created.
You can easily verify that with the patch you suggest (already committed). I see the growing size too, but to a smaller extent (with the patch, I did not try before). Sometimes some application seems to freak out and start to consume memory slowly, but I could not identify which yet. I suspect it's either FvwmButtons (unlikely) or one of the swallowed apps (xload or xosview). Well, perhaps one of these is simply recording a history in malloc'ed memory. Bye Dominik ^_^ ^_^ -- Dominik Vogt, email: [EMAIL PROTECTED] LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]