On Mon, Jan 6, 2014 at 6:24 PM, Jeff Law <l...@redhat.com> wrote:
> On 01/02/14 19:31, dxq wrote:
>>
>> hi,
>>
>> In hw-doloop.c,  is there a memory leak?
>>
>> valgrind checking shows:
>>
>> ==18622== 1,479,296 bytes in 364 blocks are definitely lost in loss record
>> 559 of 559
>> ==18622==    at 0x4006ADD: malloc (vg_replace_malloc.c:291)
>> ==18622==    by 0x8C0A9D5: xmalloc (xmalloc.c:147)
>> ==18622==    by 0x910457: _obstack_begin (in /lib/libc-2.5.so)
>> ==18622==    by 0x81EDD24: bitmap_obstack_initialize (bitmap.c:318)
>> ==18622==    by 0x8B22BBE: reorg_loops (hw-doloop.c:635)
>> ...
>> ...
>> ==18622==    by 0x8688B3E: rest_of_handle_machine_reorg (reorg.c:4183)
>> ==18622==    by 0x861D2A6: execute_one_pass (passes.c:2097)
>> ==18622==    by 0x861D6A0: execute_pass_list (passes.c:2152)
>> ==18622==    by 0x861D6BC: execute_pass_list (passes.c:2153)
>> ==18622==    by 0x861D6BC: execute_pass_list (passes.c:2153)
>>
>> should loop_stack be freed at the end of reorg_loops? please confirm!
>> if it's true, commit for me, thanks!
>>
>>      free_loops (loops);
>> +  bitmap_obstack_release (&loop_stack);
>>
>>     if (dump_file)
>>       print_rtl (dump_file, get_insns ());
>>
>> thanks!
>
> Isn't the bitmap free'd from within free_loops?

It isn't (it's hw-doloops 'loop' structures).

The patch is ok.

Thanks,
Richard.

> jeff
>

Reply via email to