Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays
Home

[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Fri, 19 Sep 2003 04:02:10 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Sorry about a late answer, it was bounced yesterday.

On Wed, 17 Sep 2003, Jason Short wrote:

> > BTW, I appreciate the elegance of using  
> >     mem = realloc(mem, ..)                  (1)
> > instead of
> >     if (!mem) {
> >       mem = malloc(...)                     (2)
> >     }
> 
> Since you may run multiple games with one civserver, the realloc (or 
> some other cleverness) is necessary.

Can you do it now?  IIRC no.  And why would you want to?  It's much easier 
to start another process, easier to control and all.

> one has realloc called much more often.  I considered renaming 
> generate_minimap as init_settlers() and moving the realloc call in 
> there.  Should I do that?

That would be a good thing IMO.  Maybe name it init_auto_settlers.

Although Per might argue that new settlers are going to change all that
anyway, since they depend on new ferry, they aren't going in any time soon
:(

> I tend to agree that having realloc be called every time is bad, 
> although I did measure both ways and on my system there was no 
> appreciable difference.

Might be different on other systems, but since you checked, it's up to 
you.

G.




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