I ran the latest Mercurial XEmacs under valgrind for awhile tonight,
just because I really enjoy using such a slow editor. :-) When I
exited, the leak check reported some lost blocks; i.e., memory that
was malloced but not freed. The leaked memory looks to be mostly Lisp
objects. Does this imply a garbage collector leak? Here are the
relevant entries.
==6361== ERROR SUMMARY: 14794 errors from 25 contexts (suppressed: 52 from 1)
==6361== malloc/free: in use at exit: 26,271,417 bytes in 18,992 blocks.
==6361== malloc/free: 908,614 allocs, 889,622 frees, 1,259,809,322 bytes allocat
ed.
==6361== For counts of detected errors, rerun with: -v
==6361== searching for pointers to 18,992 not-freed blocks.
==6361== checked 27,435,432 bytes.
==6361==
==6361==
==6361== 1 bytes in 1 blocks are definitely lost in loss record 2 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x702568: _XlcDefaultMapModifiers (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x7025EE: XSetLocaleModifiers (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x8489D63: init_x_locale (intl-x.c:51)
==6361== by 0x830681E: Fset_current_locale (intl.c:85)
==6361== by 0x81FF872: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x8189F00: Fbyte_code (bytecode.c:2620)
==6361== by 0x81FE0F8: Feval (eval.c:3676)
==6361== by 0x81F7CAF: internal_catch (eval.c:1552)
==6361== by 0x818337A: execute_rare_opcode (bytecode.c:1419)
==6361== by 0x8184EA7: execute_optimized_program (bytecode.c:754)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FE3B8: Feval (eval.c:3737)
==6361== by 0x81FEF7A: Fprogn (eval.c:954)
==6361== by 0x82032AA: Fcond (eval.c:931)
==6361== by 0x81FE865: Feval (eval.c:3647)
==6361==
==6361==
==6361== 12 bytes in 3 blocks are definitely lost in loss record 35 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x816E2AD: xmalloc (alloc.c:390)
==6361== by 0x3BD268E: __gmpz_init (in /usr/lib/sse2/libgmp.so.3.4.2)
==6361== by 0x81704AD: make_bignum (alloc.c:1427)
==6361== by 0x836321A: internal_coerce_number (number.c:478)
==6361== by 0x83640D7: promote_args (number.c:661)
==6361== by 0x81B0200: Ftimes (data.c:1648)
==6361== by 0x81FE7FD: Feval (eval.c:3703)
==6361== by 0x840BC3D: Fsetq_default (symbols.c:2146)
==6361== by 0x81FE865: Feval (eval.c:3647)
==6361== by 0x83269AD: readevalloop (lread.c:1467)
==6361== by 0x832A6F0: Fload_internal (lread.c:768)
==6361== by 0x81FF980: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361==
==6361==
==6361== 24 bytes in 3 blocks are definitely lost in loss record 94 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x3C0CF67: XtMalloc (in /usr/lib/libXt.so.6.0.0)
==6361== by 0x84AB96A: XtCompositeChildren (lwlib-utils.c:155)
==6361== by 0x846BEEF: x_tab_control_redisplay (glyphs-x.c:2785)
==6361== by 0x82DB826: redisplay_widget (glyphs-widget.c:480)
==6361== by 0x82B9544: redisplay_subwindow (glyphs.c:4704)
==6361== by 0x83B10EC: redisplay_output_subwindow (redisplay-output.c:1337)
==6361== by 0x8483A9F: x_output_display_block (redisplay-x.c:699)
==6361== by 0x83AEF35: redisplay_output_display_block
(redisplay-output.c:1246)
==6361== by 0x83B3646: output_display_line (redisplay-output.c:893)
==6361== by 0x82F6396: output_gutter (gutter.c:447)
==6361== by 0x82F6930: update_frame_gutters (gutter.c:644)
==6361== by 0x83ADB32: redisplay_frame (redisplay.c:6936)
==6361== by 0x83AE192: redisplay_device (redisplay.c:7026)
==6361== by 0x83AE627: redisplay_no_pre_idle_hook (redisplay.c:7101)
==6361== by 0x82181AA: Fnext_event (event-stream.c:2288)
==6361== by 0x81A07FF: Fcommand_loop_1 (cmdloop.c:599)
==6361== by 0x81A0963: command_loop_1 (cmdloop.c:505)
==6361== by 0x81FA001: condition_case_1 (eval.c:1946)
==6361== by 0x81A0B45: command_loop_2 (cmdloop.c:262)
==6361==
==6361==
==6361== 30 bytes in 1 blocks are possibly lost in loss record 109 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x8B8D4A: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B5D5A: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B5D88: FcNameUnparse (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x848C3D3: Ffc_name_unparse (font-mgr.c:262)
==6361== by 0x81FF872: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361==
==6361==
==6361== 4,808 (64 direct, 4,744 indirect) bytes in 2 blocks are
definitely lost in loss record 194 of 404
==6361== at 0x4004864: calloc (vg_replace_malloc.c:279)
==6361== by 0x816E228: xmalloc_and_zero (alloc.c:402)
==6361== by 0x822039D: pdump_load_finish (dumper.c:2264)
==6361== by 0x8220A44: pdump_load (dumper.c:2749)
==6361== by 0x81F1CB3: xemacs_21_5_b28_i686_pc_linux (emacs.c:1385)
==6361== by 0x81F2056: main (emacs.c:3112)
==6361==
==6361==
==6361== 112 (8 direct, 104 indirect) bytes in 1 blocks are definitely
lost in loss record 217 of 404
==6361== at 0x4005622: realloc (vg_replace_malloc.c:306)
==6361== by 0x6F8B83: (within /usr/lib/libX11.so.6.2.0)
==6361== by 0x6F971B: (within /usr/lib/libX11.so.6.2.0)
==6361== by 0x6FB677: _XlcCreateLC (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x719AFA: _XlcDefaultLoader (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x701FD2: _XOpenLC (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x702112: _XlcCurrentLC (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x7023D6: XSupportsLocale (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x8489C4A: init_x_locale (intl-x.c:43)
==6361== by 0x830681E: Fset_current_locale (intl.c:85)
==6361== by 0x81FF872: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x8189F00: Fbyte_code (bytecode.c:2620)
==6361== by 0x81FE0F8: Feval (eval.c:3676)
==6361== by 0x81F7CAF: internal_catch (eval.c:1552)
==6361== by 0x818337A: execute_rare_opcode (bytecode.c:1419)
==6361== by 0x8184EA7: execute_optimized_program (bytecode.c:754)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361==
==6361==
==6361== 214 bytes in 9 blocks are definitely lost in loss record 259 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x8B9757: FcStrCopy (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BCE16: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x87E261: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87EEDC: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87FF93: (within /lib/libexpat.so.1.5.2)
==6361== by 0x880E64: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87857A: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==6361== by 0x8BBF9B: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BC2A2: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BC717: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x87E261: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87EEDC: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87FF93: (within /lib/libexpat.so.1.5.2)
==6361== by 0x880E64: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87857A: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==6361== by 0x8BBF9B: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B1225: FcInitLoadConfig (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B134B: FcInitLoadConfigAndFonts (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B144B: FcInit (in /usr/lib/libfontconfig.so.1.2.0)
==6361==
==6361==
==6361== 216 bytes in 1 blocks are definitely lost in loss record 261 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x703185: _XimOpenIM (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x715DBF: _XimRegisterIMInstantiateCallback (in
/usr/lib/libX11.so.6.2.0)
==6361== by 0x6F2FB7: XRegisterIMInstantiateCallback (in
/usr/lib/libX11.so.6.2.0)
==6361== by 0x8224A6C: XIM_init_device (input-method-xlib.c:206)
==6361== by 0x8457731: x_init_device (device-x.c:872)
==6361== by 0x81C91D3: Fmake_device (device.c:667)
==6361== by 0x81FF8C3: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FE3B8: Feval (eval.c:3737)
==6361== by 0x81FA001: condition_case_1 (eval.c:1946)
==6361== by 0x8201DFE: condition_case_3 (eval.c:2028)
==6361== by 0x81833C2: execute_rare_opcode (bytecode.c:1438)
==6361==
==6361==
==6361== 425 bytes in 14 blocks are definitely lost in loss record 283 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x8B8D4A: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B5D5A: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B5D88: FcNameUnparse (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x848C3D3: Ffc_name_unparse (font-mgr.c:262)
==6361== by 0x81FF872: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361==
==6361==
==6361== 864 bytes in 24 blocks are definitely lost in loss record 310 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x7B2632: (within /usr/lib/libxcb.so.1.0.0)
==6361== by 0x7B138A: (within /usr/lib/libxcb.so.1.0.0)
==6361== by 0x7B2ED8: xcb_wait_for_reply (in /usr/lib/libxcb.so.1.0.0)
==6361== by 0x6ED15C: _XReply (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x6C6F68: (within /usr/lib/libX11.so.6.2.0)
==6361== by 0x6C7A2C: XLoadQueryFont (in /usr/lib/libX11.so.6.2.0)
==6361== by 0x847648B: x_initialize_font_instance (objects-x.c:245)
==6361== by 0x836545F: Fmake_font_instance (objects.c:421)
==6361== by 0x8369026: font_instantiate (objects.c:946)
==6361== by 0x81FBCE7: call_with_suspended_errors (eval.c:5390)
==6361== by 0x83FB4EF: specifier_instance_from_inst_list (specifier.c:2883)
==6361== by 0x83FBB20: specifier_instance_1 (specifier.c:3055)
==6361== by 0x83FE539: specifier_matching_foo (specifier.c:3117)
==6361== by 0x83FE66A: Fspecifier_instance (specifier.c:3209)
==6361== by 0x81FF8F9: Ffuncall (eval.c:3928)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361==
==6361==
==6361== 1,332 (1,152 direct, 180 indirect) bytes in 9 blocks are
definitely lost in loss record 323 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x8B7103: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B7A13: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B7B16: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BCC90: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x87E261: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87EEDC: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87FF93: (within /lib/libexpat.so.1.5.2)
==6361== by 0x880E64: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87857A: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==6361== by 0x8BBF9B: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BC2A2: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8BC717: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x87E261: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87EEDC: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87FF93: (within /lib/libexpat.so.1.5.2)
==6361== by 0x880E64: (within /lib/libexpat.so.1.5.2)
==6361== by 0x87857A: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==6361== by 0x8BBF9B: FcConfigParseAndLoad (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B1225: FcInitLoadConfig (in /usr/lib/libfontconfig.so.1.2.0)
==6361==
==6361==
==6361== 3,280 bytes in 820 blocks are definitely lost in loss record 347 of 404
==6361== at 0x4005525: malloc (vg_replace_malloc.c:149)
==6361== by 0x816E2AD: xmalloc (alloc.c:390)
==6361== by 0x3BD268E: __gmpz_init (in /usr/lib/sse2/libgmp.so.3.4.2)
==6361== by 0x8170520: make_bignum_bg (alloc.c:1440)
==6361== by 0x81842A2: bytecode_arithop (bytecode.c:424)
==6361== by 0x8185211: execute_optimized_program (bytecode.c:1231)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x81FC873: funcall_compiled_function (eval.c:3517)
==6361== by 0x81FF6F7: Ffuncall (eval.c:3967)
==6361== by 0x8185CD9: execute_optimized_program (bytecode.c:862)
==6361== by 0x8189F00: Fbyte_code (bytecode.c:2620)
==6361== by 0x81FE0F8: Feval (eval.c:3676)
==6361== by 0x81FA001: condition_case_1 (eval.c:1946)
==6361== by 0x8201DFE: condition_case_3 (eval.c:2028)
==6361== by 0x81833C2: execute_rare_opcode (bytecode.c:1438)
==6361==
==6361==
==6361== 6,672 (2,304 direct, 4,368 indirect) bytes in 6 blocks are
definitely lost in loss record 355 of 404
==6361== at 0x4005622: realloc (vg_replace_malloc.c:306)
==6361== by 0x8B7043: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B7A13: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B7F0B: (within /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B4760: FcFontRenderPrepare (in
/usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B4947: FcFontSetMatch (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0x8B4B29: FcFontMatch (in /usr/lib/libfontconfig.so.1.2.0)
==6361== by 0xD5F46F: XftFontMatch (in /usr/lib/libXft.so.2.1.2)
==6361== by 0xD5F6E4: XftFontOpenName (in /usr/lib/libXft.so.2.1.2)
==6361== by 0x84AC081: xft_open_font_by_name (lwlib-fonts.c:92)
==6361== by 0x84763BE: x_initialize_font_instance (objects-x.c:236)
==6361== by 0x836545F: Fmake_font_instance (objects.c:421)
==6361== by 0x8369026: font_instantiate (objects.c:946)
==6361== by 0x81F4808: va_call_trapping_problems_1 (eval.c:5320)
==6361== by 0x81F7D33: call_trapping_problems_2 (eval.c:4968)
==6361== by 0x81F9E36: call_with_condition_handler (eval.c:2157)
==6361== by 0x81F9E93: call_trapping_problems_1 (eval.c:4974)
==6361== by 0x81F7CAF: internal_catch (eval.c:1552)
==6361== by 0x81FABC4: call_trapping_problems (eval.c:5247)
==6361== by 0x81FBB5D: call_with_suspended_errors (eval.c:5415)
==6361==
==6361== LEAK SUMMARY:
==6361== definitely lost: 8,564 bytes in 893 blocks.
==6361== indirectly lost: 9,396 bytes in 233 blocks.
==6361== possibly lost: 30 bytes in 1 blocks.
==6361== still reachable: 26,253,427 bytes in 17,865 blocks.
==6361== suppressed: 0 bytes in 0 blocks.
==6361== Reachable blocks (those to which a pointer was found) are not shown.
==6361== To see them, rerun with: --leak-check=full --show-reachable=yes
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta