Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame
Home

[Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6597) Huge memory leak with autogame
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2003 06:02:10 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Raimar Falke wrote:
> On Tue, Oct 21, 2003 at 11:37:53PM -0700, Raimar Falke wrote:
> 
>>
>>I'm running an autogame with the rc-bug from the PR#6260 thread. The
>>civserver process enlarged itself to 710MB before it got killed.
> 
> 
> Found it. Please check and apply.


 From valgrind (with /endyear -2000):

==8488== 480 bytes in 5 blocks are possibly lost in loss record 12 of 18
==8488==    at 0x40160749: malloc (vg_clientfuncs.c:103)
==8488==    by 0x804AC33: fc_real_malloc (mem.c:58)
==8488==    by 0x804AD46: fc_real_calloc (mem.c:106)
==8488==    by 0x80C4BF1: create_unit_virtual (unit.c:1442)
==8488==    by 0x80DCE9D: ai_choose_diplomat_offensive (aidiplomat.c:163)
==8488==    by 0x80CC926: military_advisor_choose_build (advmilitary.c:1297)
==8488==    by 0x80D10C2: ai_manage_cities (aicity.c:520)
==8488==    by 0x80D2DE6: ai_do_last_activities (aihand.c:319)
==8488==    by 0x804E352: end_turn (srv_main.c:496)
==8488==    by 0x804FBA7: main_loop (srv_main.c:1515)
==8488==    by 0x80503E4: srv_loop (srv_main.c:1812)
==8488==    by 0x804FE68: srv_main (srv_main.c:1599)
==8488==    by 0x804A27B: main (civserver.c:154)
==8488==    by 0x403A04EC: __libc_start_main (in /lib/libc-2.3.2.so)
==8488==    by 0x8049C60: (within /tmp/jshort/freeciv/server/civserver)

So you have the location of the problem right (though I'm not sure the 
fix is correct).

jason




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