This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cc1 memory leaks


I some purify logs showing some minor memory leaks in cc1. Source is 
egcs-20000501.tar.gz.

Let me know if this is useful, or if you want me to try something else.

Thanks,

							MartinS


Run 1.
[snip.]
...
****  Purify instrumented ./cc1 (pid 12843)  ****
Purify: Searching for all memory leaks...

Memory leaked: 47612 bytes (11.9%); potentially leaked: 3388 bytes (0.843%)

MLK: 21748 bytes leaked in 32 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	calloc         [rtlib.o]
	xcalloc        [xmalloc.c:107]
	varray_init    [varray.c:40]
	cselib_init    [simplify-rtx.c:3218]
	reload_cse_regs_1 [reload1.c:7996]
  * Block of 2156 bytes at 0x7f94a0
  * Block of 1316 bytes (2 times); last block at 0x7fbe50
  * Block of 808 bytes (2 times); last block at 0x7c68f8
  * Block of 756 bytes (2 times); last block at 0x7fc718
  * Block of 728 bytes (2 times); last block at 0x7bae90
  * Block of 708 bytes (2 times); last block at 0x7b6450
  * Block of 664 bytes (2 times); last block at 0x7de3c0
  * Block of 568 bytes at 0x7c3cb8
  * Block of 564 bytes (4 times); last block at 0x7c7e60
  * Block of 516 bytes (2 times); last block at 0x7c4290
  * Block of 512 bytes (2 times); last block at 0x7c9230
  * Block of 508 bytes (2 times); last block at 0x7a6b70
  * Block of 504 bytes (2 times); last block at 0x7a5980
  * Block of 456 bytes (4 times); last block at 0x7f5ef8
  * Block of 452 bytes (2 times); last block at 0x7f2428

MLK: 20792 bytes leaked in 16 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	calloc         [rtlib.o]
	xcalloc        [xmalloc.c:107]
	varray_init    [varray.c:40]
	cselib_init    [simplify-rtx.c:3218]
	load_mems      [loop.c:9709]
  * Block of 2132 bytes at 0x7e4a40
  * Block of 2124 bytes at 0x806250
  * Block of 2116 bytes at 0x7f1920
  * Block of 2108 bytes at 0x7d2c40
  * Block of 2072 bytes at 0x7ee288
  * Block of 2052 bytes at 0x7d6290
  * Block of 2044 bytes at 0x7f8c48
  * Block of 2024 bytes at 0x7da0a0
  * Block of 564 bytes at 0x79b298
  * Block of 560 bytes at 0x7c3f90
  * Block of 504 bytes at 0x7a45d0
  * Block of 500 bytes (3 times); last block at 0x7c7818
  * Block of 496 bytes (2 times); last block at 0x7b5768

MLK: 2720 bytes leaked in 34 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	push_string    [c-typeck.c:4395]
	start_init     [c-typeck.c:4940]
	yyparse        [c-parse.y:994]
	compile_file   [toplev.c:2262]
  * Block of 80 bytes (34 times); last block at 0x807e58

MLK: 1520 bytes leaked in 14 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	create_edge_list [flow.c:6428]
	schedule_insns [haifa-sched.c:6903]
	rest_of_compilation [toplev.c:3232]
	finish_function [c-decl.c:6499]
  * Block of 488 bytes at 0x7c4cd8
  * Block of 240 bytes at 0x7a10b8
  * Block of 140 bytes at 0x7c89d0
  * Block of 100 bytes at 0x7b7d28
  * Block of 92 bytes at 0x79fac8
  * Block of 80 bytes (2 times); last block at 0x7b5438
  * Block of 76 bytes at 0x7c0508
  * Block of 52 bytes at 0x788ef0
  * Block of 44 bytes at 0x7a8d90
  * Block of 40 bytes at 0x7a0858
  * Block of 32 bytes (2 times); last block at 0x7c4c60
  * Block of 24 bytes at 0x780f70

MLK: 520 bytes leaked in 6 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	sbitmap_vector_alloc [sbitmap.c:77]
	flow_loops_find [flow.c:7286]
	rest_of_compilation [toplev.c:3114]
	finish_function [c-decl.c:6499]
  * Block of 260 bytes at 0x7c0900
  * Block of 100 bytes (2 times); last block at 0x7fc5d0
  * Block of 20 bytes (3 times); last block at 0x7e1990

MLK: 168 bytes leaked in 14 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	create_edge_list [flow.c:6425]
	schedule_insns [haifa-sched.c:6903]
	rest_of_compilation [toplev.c:3232]
	finish_function [c-decl.c:6499]
  * Block of 12 bytes (14 times); last block at 0x7fada8

MLK: 144 bytes leaked in 3 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	assign_stack_temp_for_type [function.c:756]
	assign_temp    [function.c:881]
	expand_decl    [stmt.c:3828]
	start_decl     [c-decl.c:3424]
  * Block of 48 bytes (3 times); last block at 0x7f4310

PLK: 3388 bytes potentially leaked in 3 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	calloc         [rtlib.o]
	xcalloc        [xmalloc.c:107]
	varray_init    [varray.c:40]
	cselib_init    [simplify-rtx.c:3218]
	reload_cse_regs_1 [reload1.c:7996]
  * Block of 2156 bytes at 0x8074a0
  * Block of 664 bytes at 0x7c2550
  * Block of 568 bytes at 0x7df670

Purify Heap Analysis (combining suppressed and unsuppressed blocks)
                         Blocks      Bytes
              Leaked        119      47612
  Potentially Leaked          3       3388
              In-Use        948     350662
  ----------------------------------------
     Total Allocated       1070     401662

****  Purify instrumented ./cc1 (pid 12843)  ****
  * Program exited with status code 0.
  * 0 access errors, 0 total occurrences.
  * 47612 bytes leaked.
  * 3388 bytes potentially leaked.
  * Basic memory usage (including Purify overhead):
     7355028 code
      276748 data/bss
      811008 heap (peak use)
       13904 stack
  * Shared library memory usage (including Purify overhead):
      963253 libc.so.1_pure_p3_c0_410_56 (shared code)
       30952 libc.so.1_pure_p3_c0_410_56 (private data)
        2036 libdl.so.1_pure_p3_c0_410_56 (shared code)
           4 libdl.so.1_pure_p3_c0_410_56 (private data)
        9576 libinternal_stubs.so.1 (shared code)
         324 libinternal_stubs.so.1 (private data)
  * Memory mapped usage:
        8192 mmap'd at 0xed010000
        8192 mmap'd at 0xed020000
        8192 mmap'd at 0xed030000
...
[snip.]


Run 2:

[snip.]
...
****  Purify instrumented ./cc1 (pid 12907)  ****
Purify: Searching for all memory leaks...

Memory leaked: 368 bytes (0.491%); potentially leaked: 0 bytes (0%)

MLK: 320 bytes leaked in 4 blocks
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	push_string    [c-typeck.c:4395]
	start_init     [c-typeck.c:4940]
	yyparse        [c-parse.y:994]
	compile_file   [toplev.c:2262]
  * Block of 80 bytes (4 times); last block at 0x78e248

MLK: 48 bytes leaked at 0x77c2e0
  * This memory was allocated from:
	malloc         [rtlib.o]
	xmalloc        [xmalloc.c:72]
	assign_stack_temp_for_type [function.c:756]
	assign_temp    [function.c:881]
	expand_decl    [stmt.c:3828]
	start_decl     [c-decl.c:3424]

Purify Heap Analysis (combining suppressed and unsuppressed blocks)
                         Blocks      Bytes
              Leaked          5        368
  Potentially Leaked          0          0
              In-Use        233      74580
  ----------------------------------------
     Total Allocated        238      74948

****  Purify instrumented ./cc1 (pid 12907)  ****
  * Program exited with status code 0.
  * 0 access errors, 0 total occurrences.
  * 368 bytes leaked.
  * 0 bytes potentially leaked.
  * Basic memory usage (including Purify overhead):
     7355028 code
      276748 data/bss
      188416 heap (peak use)
       14000 stack
  * Shared library memory usage (including Purify overhead):
      963253 libc.so.1_pure_p3_c0_410_56 (shared code)
       30952 libc.so.1_pure_p3_c0_410_56 (private data)
        2036 libdl.so.1_pure_p3_c0_410_56 (shared code)
           4 libdl.so.1_pure_p3_c0_410_56 (private data)
        9576 libinternal_stubs.so.1 (shared code)
         324 libinternal_stubs.so.1 (private data)
  * Memory mapped usage:
        8192 mmap'd at 0xee770000
        8192 mmap'd at 0xee780000
        8192 mmap'd at 0xee790000
...
[snip.]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]