Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)
Home

[Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 May 2002 11:22:30 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, May 13, 2002 at 09:02:47AM -0500, Mike Kaufman wrote:
> On Mon, May 13, 2002 at 10:59:23AM +0200, Raimar Falke wrote:
> > > 
> > > we already have a [smaller] memory leak when diconnecting and
> > > reconnecting to the server (or quitting the server and restarting it).
> > > this "fix" really intensifies the memory leak---depending on the
> > > savegame size---by about an order of magnitude.
> > > 
> > > We should probably introduce a game_free() function that frees all the
> > > lists and players and such before calling game_init()
> > 
> > About what memory leak are we talking here?
> 
> I didn't look too hard, but the symptom is easy enough to see: without your
> patch connect and disconnect to a running game and watch civclient's memory
> usage go up, both in gtk and xaw (though xaw doesn't go up as much)
> Actually what I did was quit and restart the server, etc...
> 
> apply your patch and watch the memory usage go up more than 10 times 
> what it did unpatched, esp. if it's a large game.
> > 
> > If you look at idex_init and map_allocate: both free the stuff before
> > they allocate new memory.
> 
> the map frees, yes, but I don't believe the player maps are freed if I 
> recall, and I don't believe that most of the linked lists get freed, at 
> least not explicitly. (what seems to change with the game_init() is the
> gen-impr vectors...)

I will take a look at this since I don't like the fix (for loop) that
Daniel proposes.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Your mail could not be delivered to the following Address:
  VTCMC.VTLPR@xxxxxxxxxxxxx        ** Unassigned error message **"


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