Re: Widget memory allocation



On Mon, Nov 22 1999, at 10:46:33 -0500, Havoc Pennington wrote:
> > Here's an example that leaks about 8KB of memory every time I open
> > and close the dialog. Should the dialog be freed? Is it me, gnome
> > or something else that is leaking. I am using:
> 
> Doesn't look like it should leak. If you're using glibc/Linux, 
> try memprof and see if it reports leaks. If memprof doesn't report a leak
> then probably you're just using the wrong method to detect leaks. If it
> does report a leak, then it will also report where the leak occurred.

I tried memprof 0.3. Should "# of Allocations" stay constant
between opening and closing the dialog? How about "Total Bytes"?
Here are the numbers for opening and closing the dialog six
times. The first value pair is before opening, the rest after
closing:
# of Allocs    Total Bytes
3962           164857
4462           191312
4507           199316
4552           207216
4597           215116
4642           223013
4688           231038

I do not yet have all the libraries compiled with debuging symbols,
but I will include the leakinfo file produced by memprof after the
last dialog close.

Regards,
Björn Andersson
Leaked 0x805bf30 (6 bytes)
	(???)
	(???)
	(???)
	gnome_init_cb(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:233
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:58
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:52
	poptGetNextOpt(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:319
	gnomelib_parse_args(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnome-popt.c:86
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:453
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x8057e90 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gdk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gdk/gdkim.c:107
	gtk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gtk/gtkmain.c:445
	gnome_init_cb(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:217
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:58
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:52
	poptGetContext(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:91
	gnomelib_parse_args(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnome-popt.c:80
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:453
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x8057e80 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gdk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gdk/gdkim.c:107
	gtk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gtk/gtkmain.c:445
	gnome_init_cb(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:217
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:58
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:52
	poptGetContext(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:91
	gnomelib_parse_args(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnome-popt.c:80
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:453
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x8057e70 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gdk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gdk/gdkim.c:107
	gtk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gtk/gtkmain.c:445
	gnome_init_cb(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:217
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:58
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:52
	poptGetContext(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:91
	gnomelib_parse_args(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnome-popt.c:80
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:453
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x8057e60 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gdk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gdk/gdkim.c:107
	gtk_set_locale(): /usr/local/src/gnome/gtk+-1.2.6/gtk/gtkmain.c:445
	gnome_init_cb(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:217
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:58
	invokeCallbacks(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:52
	poptGetContext(): /usr/local/src/gnome/gnome-libs-1.0.54/support/popt.c:91
	gnomelib_parse_args(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnome-popt.c:80
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:453
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804c2e0 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804c2c8 (17 bytes)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804be18 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804be00 (17 bytes)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804b908 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804b8f0 (17 bytes)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804ad08 (9 bytes)
	(???)
	(???)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0
Leaked 0x804acf0 (17 bytes)
	(???)
	(???)
	gnomelib_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnome/gnomelib-init.c:182
	gnome_init_with_popt_table(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:438
	gnome_init(): /usr/local/src/gnome/gnome-libs-1.0.54/libgnomeui/gnome-init.c:486
	main(): /home/ban/proj/gnome/memtest/memtest.c:28
	_start(): (null):0


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