Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6742) civclient memory leak
Home

[Freeciv-Dev] Re: (PR#6742) civclient memory leak

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6742) civclient memory leak
From: "Christian Knoke" <chrisk@xxxxxxxxx>
Date: Wed, 5 Nov 2003 14:04:26 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Nov 05, 2003 at 10:23:49AM -0800, Raimar Falke wrote:
> 
> > Memory consumption of civclient grows rapidly, right now 17900/14612
> > VSS/RSS with 4 players on standard map.
> 
> I created 3 valgrind dumps:

> We loose 300k in 5 turns.
> 
> There is a constant (does not increase with the number of turns)
> memory leak in cm.c. Because a cache was not destroyed. The attached
> patch fixes this.
> 
> The remaining leaks are gtk2 related (either in the gtk lib or in the
> gtk client code).
> 
> 30k are caused by update_menus:
> + 15400 bytes in 110 blocks are still reachable in loss record 7697 of 7709
> +    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
> +    by 0x405E4A90: g_malloc0 (in /usr/lib/libglib-2.0.so.0.200.0)
> +    by 0x405A46C0: g_type_create_instance (in 
> /usr/lib/libgobject-2.0.so.0.200.0)
> +    by 0x4058F29B: (within /usr/lib/libgobject-2.0.so.0.200.0)
> +    by 0x4058E939: g_object_newv (in /usr/lib/libgobject-2.0.so.0.200.0)
> +    by 0x4058EFB1: g_object_new_valist (in 
> /usr/lib/libgobject-2.0.so.0.200.0)
> +    by 0x4058E5D2: g_object_new (in /usr/lib/libgobject-2.0.so.0.200.0)
> +    by 0x40285ABB: gtk_accel_label_new (in 
> /usr/lib/libgtk-x11-2.0.so.0.200.0)
> +    by 0x402F094E: gtk_image_menu_item_new_with_label (in 
> /usr/lib/libgtk-x11-2.0.so.0.200.0)
> +    by 0x809930B: update_menus (menu.c:1057)
> maybe the old entries should be unrefed/deleted/freed.

Is this a possible cause?

chris@max:~> civclient -t trident -P none
1: Can't set sensitivity for non-existent menu <main>/Befehle/Disband Unit.
1: letzte Mitteilung 2mal wiederholt
1: letzte Mitteilung 2mal wiederholt (insgesamt 4 Wiederholungen)
1: letzte Mitteilung 4mal wiederholt (insgesamt 8 Wiederholungen)
1: letzte Mitteilung 8mal wiederholt (insgesamt 16 Wiederholungen)
1: letzte Mitteilung 16mal wiederholt (insgesamt 32 Wiederholungen)
1: letzte Mitteilung 32mal wiederholt (insgesamt 64 Wiederholungen)
1: letzte Mitteilung 64mal wiederholt (insgesamt 128 Wiederholungen)
1: letzte Mitteilung 128mal wiederholt (insgesamt 256 Wiederholungen)
1: letzte Mitteilung 256mal wiederholt (insgesamt 512 Wiederholungen)
1: letzte Mitteilung 512mal wiederholt (insgesamt 1024 Wiederholungen)
1: letzte Mitteilung 1024mal wiederholt (insgesamt 2048 Wiederholungen)
1: letzte Mitteilung 1589mal wiederholt (insgesamt 3637 Wiederholungen)
2: lost connection to server

Christian

-- 
Christian Knoke            * * *            http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



[Prev in Thread] Current Thread [Next in Thread]