[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]
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.
- [Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays,
Gregory Berkolaiko <=
[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays, Per I. Mathisen, 2003/09/19
[Freeciv-Dev] Re: (PR#6182) remove some static map-sized arrays, Per I. Mathisen, 2003/09/19
|
|