Follow-up Comment #6, patch #1739 (project freeciv): a small analysis of the memory usage of freeciv (using pmap)
naming convention: * freeciv server: log_server-<version>-<# player>-<1 = connected + started> * freeciv client (gtk): log_client-<version>-<# player>-<1 = connected + started> * <versions>: S2_2 = something between R2_2_1 and S2_2 (on another system and no debug information!) X1 = svn 17555 (before increased map size + player numbers) X2 = svn 17568 (after increased map size + player numbers) X3 = with patches for dynamically allocated players (126+2) X3a = limit dynamically allocated players to (30+2) * <# players> 1 = 'set aifill 1' (default map size [4]) 30 = 'set aifill 30' (default map size [4]) 126 = 'set aifill 126' (default map size [4]) 126map = 'set aifill 126; set size 128; set generator 2' == analysis == * memory for the executeable (SIZE column in the tables): EXEC RO RW [client:S2_2] 1552K + 4K + 28K [client:X1] 1896K + 4K + 44K [client:X2] 1896K + 4K + 44K [client:X3] 1900K + 4K + 44K [client:X3a] 1900K + 4K + 44K [server:S2_2] 1708K + 4K + 16K [server:X1] 2188K + 4K + 24K [server:X2] 2268K + 4K + 24K [server:X3] 2272K + 4K + 24K [server:X3a] 2272K + 4K + 24K * heap size ('-' not started; '+': connected and started) 1P- 1P+ 30P- 30P+ 126P- 126P+ 126P-m 126P+m [client:S2_2] 49120K 101044K 49120K 101200K [client:X1] 53816K 135280K 53344K 133464K [client:X2] 61812K 141864K 61812K 145632K 61636K 144092K [client:X3] 61084K 141052K 59592K 140008K 61084K 143756K 61088K 153892K [client:X3a] 53248K 136016K 53260K 133780K [server:S2_2] 7336K 7464K 7336K 10704K [server:X1] 10280K 11564K 10280K 17248K [server:X2] 13708K 15012K 13708K 21116K 13708K 40572K [server:X3] 10932K 12428K 10932K 18768K 11644K 41504K 12000K 30704K [server:X3a] 9816K 11156K 9816K 17420K * there seems to be a lot of structs / static definitions which use MAX_NUM_PLAYERS (bv_players?); thus the memory requirement is increased if the number of players is increased (X1 => X2) * on the client side the heap size is increased by ca. 8MB. Could this be due to ./client/tilespec.c:311? ('player_borders[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS][EDGE_COUNT][2];') If the number of players is reduced to 30+2 the memory requirement is similar. (file #9487) _______________________________________________________ Additional Item Attachment: File name: memory.txt Size:32 KB _______________________________________________________ Reply to this item at: <http://gna.org/patch/?1739> _______________________________________________ Nachricht geschickt von/durch Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev