Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2525) Server memory leaks
Home

[Freeciv-Dev] Re: (PR#2525) Server memory leaks

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2525) Server memory leaks
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 16 Dec 2002 10:29:44 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Dec 09, 2002 at 02:52:11AM -0800, Raimar Falke via RT wrote:
> 
> 
> mem_leak: loading a savegame via -f, perform a small number of turns
> and exit.
> 
> mem_leak_with_reload: loading a savegame via -f, "load" the same game,
> perform a small number of turns and exit.
> 
> The difference is very small (200 bytes) but the absulute number is
> quite large (600k).

The attached obvious fix takes care. Remaining are 81k now.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "The primary purpose of the DATA statement is to give names to
   constants; instead of referring to pi as 3.141592653589793 at every
   appearance, the variable PI can be given that value with a DATA
   statement and used instead of the longer form of the constant. This
   also simplifies modifying the program, should the value of pi
   change."
    -- FORTRAN manual for Xerox Computers

Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.108
diff -u -u -r1.108 srv_main.c
--- server/srv_main.c   2002/12/11 10:39:43     1.108
+++ server/srv_main.c   2002/12/16 18:05:02
@@ -606,6 +606,16 @@
 }
 
 /**************************************************************************
+ Quit the server and exit.
+**************************************************************************/
+void server_quit(void)
+{
+  server_game_free();
+  close_connections_and_socket();
+  exit(EXIT_SUCCESS);
+}
+
+/**************************************************************************
 ...
 **************************************************************************/
 static void handle_report_request(struct connection *pconn,
@@ -1909,9 +1919,7 @@
   while (TRUE) {
     srv_loop();
     if (game.timeout == -1) {
-      game_free();
-      close_connections_and_socket();
-      exit(EXIT_SUCCESS);
+      server_quit();
     }
 
     send_game_state(&game.est_connections, CLIENT_GAME_OVER_STATE);
@@ -1936,8 +1944,6 @@
   }
 
   /* Technically, we won't ever get here... */
-  game_free();
-  close_connections_and_socket();
 }
 
 /**************************************************************************
Index: server/srv_main.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.h,v
retrieving revision 1.12
diff -u -u -r1.12 srv_main.h
--- server/srv_main.h   2002/09/28 01:36:24     1.12
+++ server/srv_main.h   2002/12/16 18:05:02
@@ -42,6 +42,7 @@
 
 void srv_init(void);
 void srv_main(void);
+void server_quit(void);
 
 bool handle_packet_input(struct connection *pconn, void *packet, int type);
 void lost_connection_to_client(struct connection *pconn);
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.267
diff -u -u -r1.267 stdinhand.c
--- server/stdinhand.c  2002/12/08 23:42:37     1.267
+++ server/stdinhand.c  2002/12/16 18:05:10
@@ -3062,6 +3062,15 @@
 }
 
 /**************************************************************************
+...
+**************************************************************************/
+static void quit_game(struct connection *caller)
+{
+  cmd_reply(CMD_QUIT, caller, C_OK, _("Goodbye."));
+  server_quit();
+}
+
+/**************************************************************************
   Handle "command input", which could really come from stdin on console,
   or from client chat command, or read from file with -r, etc.
   caller==NULL means console, str is the input, which may optionally
@@ -3353,16 +3362,6 @@
            _("Cutting connection %s."), ptarget->name);
   lost_connection_to_client(ptarget);
   close_connection(ptarget);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
-void quit_game(struct connection *caller)
-{
-  cmd_reply(CMD_QUIT, caller, C_OK, _("Goodbye."));
-  close_connections_and_socket();
-  exit(EXIT_SUCCESS);
 }
 
 /**************************************************************************
Index: server/stdinhand.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.h,v
retrieving revision 1.25
diff -u -u -r1.25 stdinhand.h
--- server/stdinhand.h  2002/08/06 22:27:05     1.25
+++ server/stdinhand.h  2002/12/16 18:05:11
@@ -27,7 +27,6 @@
 bool read_init_script(struct connection *caller, char *script_filename);
 void show_players(struct connection *caller);
 
-void quit_game(struct connection *caller);
 void load_command(struct connection *caller, char *arg);
 
 
==12186== 2 bytes in 1 blocks are still reachable in loss record 1 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804CF85: real_mystrdup (mem.c:120)
==12186==    by 0x804C286: init_nls (shared.c:1114)
==12186== 
==12186== 3 bytes in 1 blocks are still reachable in loss record 2 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x402599C3: expand_prompt (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40259BA7: rl_expand_prompt (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 3 bytes in 1 blocks are still reachable in loss record 3 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4024D51A: rl_set_prompt (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025E6BF: rl_callback_handler_install (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 3 bytes in 1 blocks are still reachable in loss record 4 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804C2EB: init_nls (shared.c:1111)
==12186==    by 0x804D9FB: srv_init (srv_main.c:162)
==12186== 
==12186== 6 bytes in 1 blocks are still reachable in loss record 5 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4034FC5F: __strdup (in /lib/libc-2.2.5.so)
==12186==    by 0x40292837: set_attribute_9 (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40292A68: tgetent (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 6 bytes in 1 blocks are still reachable in loss record 6 of 59
==12186==    at 0x4003BFA3: realloc (vg_clientfuncs.c:270)
==12186==    by 0x40290DDC: _nc_doalloc (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x4029339E: really_get_space (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40293C11: tparm (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 11 bytes in 1 blocks are still reachable in loss record 7 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804CF85: real_mystrdup (mem.c:120)
==12186==    by 0x804B798: user_home_dir (shared.c:676)
==12186== 
==12186== 13 bytes in 1 blocks are still reachable in loss record 8 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40256E34: _rl_read_init_file (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40256D95: rl_read_init_file (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 16 bytes in 2 blocks are still reachable in loss record 9 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025F8A5: add_history (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x8095989: handle_readline_input_callback (sernet.c:165)
==12186== 
==12186== 19 bytes in 1 blocks are definitely lost in loss record 10 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4026260E: sh_set_lines_and_columns (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4025E933: _rl_get_screen_size (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 20 bytes in 2 blocks are still reachable in loss record 11 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025F8B9: add_history (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x8095989: handle_readline_input_callback (sernet.c:165)
==12186== 
==12186== 20 bytes in 2 blocks are definitely lost in loss record 12 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4024D798: readline_internal_teardown (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4025E73E: rl_callback_read_char (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 20 bytes in 1 blocks are still reachable in loss record 13 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40256FB6: parser_if (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40257371: handle_parser_directive (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 20 bytes in 1 blocks are still reachable in loss record 14 of 59
==12186==    at 0x4003BFA3: realloc (vg_clientfuncs.c:270)
==12186==    by 0x804CE9D: fc_real_realloc (mem.c:84)
==12186==    by 0x804BA29: get_data_dirs (shared.c:832)
==12186==    by 0x804BF17: datafilename (shared.c:956)
==12186== 
==12186== 21 bytes in 1 blocks are definitely lost in loss record 15 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40262635: sh_set_lines_and_columns (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4025E933: _rl_get_screen_size (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 23 bytes in 1 blocks are still reachable in loss record 16 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x40290FD4: _nc_home_terminfo (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40298129: _nc_read_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40292381: grab_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 28 bytes in 1 blocks are still reachable in loss record 17 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x402978A0: read_termtype (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297F5D: _nc_read_file_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297FDE: _nc_read_tic_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 30 bytes in 1 blocks are still reachable in loss record 18 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80965B6: sniff_packets (sernet.c:344)
==12186==    by 0x8051305: srv_loop (srv_main.c:1958)
==12186== 
==12186== 32 bytes in 1 blocks are definitely lost in loss record 19 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80B9700: renew_timer (timing.c:183)
==12186==    by 0x80B9732: renew_timer_start (timing.c:201)
==12186== 
==12186== 32 bytes in 1 blocks are still reachable in loss record 20 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80B9700: renew_timer (timing.c:183)
==12186==    by 0x80B9670: new_timer (timing.c:154)
==12186== 
==12186== 44 bytes in 1 blocks are still reachable in loss record 21 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x4029790C: read_termtype (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297F5D: _nc_read_file_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297FDE: _nc_read_tic_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 48 bytes in 1 blocks are still reachable in loss record 22 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80A55E8: genlist_sort (genlist.c:236)
==12186==    by 0x80BBBA0: unit_list_sort_ord_city (unit.c:998)
==12186== 
==12186== 51 bytes in 1 blocks are still reachable in loss record 23 of 59
==12186==    at 0x4003BFA3: realloc (vg_clientfuncs.c:270)
==12186==    by 0x804CE9D: fc_real_realloc (mem.c:84)
==12186==    by 0x804CB22: astr_minsize (astring.c:82)
==12186==    by 0x804BF5C: datafilename (sys/stat.h:346)
==12186== 
==12186== 52 bytes in 4 blocks are still reachable in loss record 24 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804CF85: real_mystrdup (mem.c:120)
==12186==    by 0x804BAC7: get_data_dirs (shared.c:819)
==12186== 
==12186== 56 bytes in 2 blocks are still reachable in loss record 25 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x400098AA: _dl_map_object_deps_internal (in /lib/ld-2.2.5.so)
==12186==    by 0x403DA84E: dl_open_worker (in /lib/libc-2.2.5.so)
==12186==    by 0x4000A931: _dl_catch_error_internal (in /lib/ld-2.2.5.so)
==12186== 
==12186== 57 bytes in 2 blocks are still reachable in loss record 26 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x40008191: _dl_new_object (in /lib/ld-2.2.5.so)
==12186==    by 0x40004152: _dl_map_object_from_fd (in /lib/ld-2.2.5.so)
==12186==    by 0x400053FB: _dl_map_object_internal (in /lib/ld-2.2.5.so)
==12186== 
==12186== 57 bytes in 2 blocks are still reachable in loss record 27 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x400054E1: _dl_map_object_internal (in /lib/ld-2.2.5.so)
==12186==    by 0x403DA7AC: dl_open_worker (in /lib/libc-2.2.5.so)
==12186==    by 0x4000A931: _dl_catch_error_internal (in /lib/ld-2.2.5.so)
==12186== 
==12186== 78 bytes in 1 blocks are still reachable in loss record 28 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x40297983: read_termtype (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297F5D: _nc_read_file_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297FDE: _nc_read_tic_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 84 bytes in 1 blocks are still reachable in loss record 29 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x40290E09: _nc_doalloc (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40293463: tparm (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40292821: set_attribute_9 (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 96 bytes in 3 blocks are still reachable in loss record 30 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80B9700: renew_timer (timing.c:183)
==12186==    by 0x80B9732: renew_timer_start (timing.c:201)
==12186== 
==12186== 100 bytes in 1 blocks are still reachable in loss record 31 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80D0D83: ai_manage_units (aiunit.c:2485)
==12186==    by 0x804E2E9: ai_start_turn (srv_main.c:431)
==12186== 
==12186== 160 bytes in 2 blocks are still reachable in loss record 32 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x4000BACA: _dl_check_map_versions_internal (in 
/lib/ld-2.2.5.so)
==12186==    by 0x403DAB31: dl_open_worker (in /lib/libc-2.2.5.so)
==12186==    by 0x4000A931: _dl_catch_error_internal (in /lib/ld-2.2.5.so)
==12186== 
==12186== 168 bytes in 1 blocks are still reachable in loss record 33 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x402924C0: setupterm (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40292965: tgetent (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x4025EBE2: _rl_init_terminal_io (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 232 bytes in 18 blocks are still reachable in loss record 34 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80BD0FB: precalc_one (unittype.c:492)
==12186==    by 0x80BD231: role_unit_precalcs (unittype.c:522)
==12186== 
==12186== 240 bytes in 1 blocks are still reachable in loss record 35 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804CF22: fc_real_calloc (mem.c:107)
==12186==    by 0x8050E73: srv_loop (srv_main.c:1969)
==12186== 
==12186== 240 bytes in 1 blocks are still reachable in loss record 36 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x804CF22: fc_real_calloc (mem.c:107)
==12186==    by 0x8050E41: srv_loop (srv_main.c:1968)
==12186== 
==12186== 256 bytes in 1 blocks are still reachable in loss record 37 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4024DE25: readline_initialize_everything (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4024DD48: rl_initialize (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 260 bytes in 28 blocks are still reachable in loss record 38 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80BD0FB: precalc_one (unittype.c:492)
==12186==    by 0x80BD211: role_unit_precalcs (unittype.c:519)
==12186== 
==12186== 384 bytes in 32 blocks are still reachable in loss record 39 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x80A535F: genlist_insert (genlist.c:130)
==12186==    by 0x80A13A0: conn_list_insert (speclist_c.h:56)
==12186== 
==12186== 512 bytes in 1 blocks are still reachable in loss record 40 of 59
==12186==    at 0x4003BFA3: realloc (vg_clientfuncs.c:270)
==12186==    by 0x4025F444: xrealloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40252225: rl_add_funmap_entry (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x402522C6: rl_initialize_funmap (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 600 bytes in 1 blocks are still reachable in loss record 41 of 59
==12186==    at 0x4003BFA3: realloc (vg_clientfuncs.c:270)
==12186==    by 0x4025F444: xrealloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025F88B: add_history (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40261ECA: read_history_range (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 687 bytes in 100 blocks are still reachable in loss record 42 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025F8B9: add_history (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40261ECA: read_history_range (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 800 bytes in 100 blocks are still reachable in loss record 43 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025F8A5: add_history (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40261ECA: read_history_range (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 936 bytes in 117 blocks are still reachable in loss record 44 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40252234: rl_add_funmap_entry (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x402522C6: rl_initialize_funmap (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 951 bytes in 1 blocks are still reachable in loss record 45 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4029781D: read_termtype (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297F5D: _nc_read_file_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297FDE: _nc_read_tic_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 1024 bytes in 1 blocks are still reachable in loss record 46 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40259D3A: init_line_structures (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x40259DCC: rl_redisplay (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 1024 bytes in 1 blocks are still reachable in loss record 47 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40259C5A: init_line_structures (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x40259DCC: rl_redisplay (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 1024 bytes in 1 blocks are still reachable in loss record 48 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40259D51: init_line_structures (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x40259DCC: rl_redisplay (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 1024 bytes in 1 blocks are still reachable in loss record 49 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40259C6D: init_line_structures (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x40259DCC: rl_redisplay (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== 1129 bytes in 2 blocks are still reachable in loss record 50 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x40007F7B: _dl_new_object (in /lib/ld-2.2.5.so)
==12186==    by 0x40004152: _dl_map_object_from_fd (in /lib/ld-2.2.5.so)
==12186==    by 0x400053FB: _dl_map_object_internal (in /lib/ld-2.2.5.so)
==12186== 
==12186== 1656 bytes in 1 blocks are still reachable in loss record 51 of 59
==12186==    at 0x4003BE90: calloc (vg_clientfuncs.c:239)
==12186==    by 0x402979E8: read_termtype (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297F5D: _nc_read_file_entry (in /usr/lib/libncurses.so.5.2)
==12186==    by 0x40297FDE: _nc_read_tic_entry (in /usr/lib/libncurses.so.5.2)
==12186== 
==12186== 2032 bytes in 1 blocks are still reachable in loss record 52 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025EBA0: _rl_init_terminal_io (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4024DE55: readline_initialize_everything (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 3312 bytes in 36 blocks are still reachable in loss record 53 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x8072997: get_empty_array (gotohand.c:114)
==12186==    by 0x8072A2B: add_to_mapqueue (gotohand.c:134)
==12186== 
==12186== 4000 bytes in 80 blocks are still reachable in loss record 54 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x8072B55: init_warmap (gotohand.c:191)
==12186==    by 0x8072CDF: really_generate_warmap (gotohand.c:273)
==12186== 
==12186== 4000 bytes in 80 blocks are still reachable in loss record 55 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x8072BA9: init_warmap (gotohand.c:193)
==12186==    by 0x8072CDF: really_generate_warmap (gotohand.c:273)
==12186== 
==12186== 4000 bytes in 80 blocks are still reachable in loss record 56 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x8072B7D: init_warmap (gotohand.c:192)
==12186==    by 0x8072CDF: really_generate_warmap (gotohand.c:273)
==12186== 
==12186== 4080 bytes in 1 blocks are still reachable in loss record 57 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x4025EBC0: _rl_init_terminal_io (in 
/usr/lib/libreadline.so.4.2)
==12186==    by 0x4024DE55: readline_initialize_everything (in 
/usr/lib/libreadline.so.4.2)
==12186== 
==12186== 12696 bytes in 138 blocks are still reachable in loss record 58 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x804CDEE: fc_real_malloc (mem.c:59)
==12186==    by 0x8072997: get_empty_array (gotohand.c:114)
==12186==    by 0x8072A15: add_to_mapqueue (gotohand.c:137)
==12186== 
==12186== 32768 bytes in 16 blocks are still reachable in loss record 59 of 59
==12186==    at 0x4003B9B4: malloc (vg_clientfuncs.c:100)
==12186==    by 0x4025F3FC: xmalloc (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x402523C0: rl_make_bare_keymap (in /usr/lib/libreadline.so.4.2)
==12186==    by 0x40256083: rl_generic_bind (in /usr/lib/libreadline.so.4.2)
==12186== 
==12186== LEAK SUMMARY:
==12186==    definitely lost: 92 bytes in 5 blocks.
==12186==    possibly lost:   0 bytes in 0 blocks.
==12186==    still reachable: 81154 bytes in 880 blocks.

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