[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
Freeciv developers <freeciv-dev@xxxxxxxxxxx> |
Subject: |
[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets |
From: |
Reinier Post <rp@xxxxxxxxxx> |
Date: |
Mon, 3 Dec 2001 02:22:47 +0100 |
On Mon, Dec 03, 2001 at 12:50:58AM +0100, Petr Baudis wrote:
> > > > oh... don't forget, your tile is now 160 bytes. assuming a map of only
> > > > 32
> > > > by 32, that comes to a total of... 160 KB. and that's for a small map.
> > > > using c++, you'd lose all the function pointers (reduce to 64 bytes).
> > >
> > > uh, who says each tile will have own copy of structure with handlers?
> >
> > pointers as members of a structure DO occupy memory consumption - even
> > function pointers. a total of 5 ptrs, that's 4 bytes per pointer = 20. oops
> > i
> > was thinking bits and multiplying bytes ;) let me redo the math. 20 * 1024
> > <-
> > 32^2) = 20 KB for the map. so, every 32 bit field you add to the tile will
> > jump the number by 4 K (e.g. a 6th ptr would yield 6 * 4 * 24 == 24 KB).
> please read once more what i said ;-). i didn't say pointers won't be member
> of any structure or that they don't take any place. i said you will have just
> ONE pointer per tile for handlers, and it will point to handlers table of
> appropriate tile type. well, s/will/would/ :-).
You're not thinking this through. You are reinventing the C++ class.
You'll be reinventing the rest of it (inheritance, polymorphism) before
you finish your example.
--
Reinier
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, (continued)
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Ed Hunter, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Ross W. Wetmore, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets,
Reinier Post <=
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Tony Stuckey, 2001/12/03
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Raahul Kumar, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Andrew Sutton, 2001/12/04
- [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Petr Baudis, 2001/12/04
[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets, Reinier Post, 2001/12/02
Message not available
|
|