[patch] plug mem leak in gcse

Richard Guenther richard.guenther@gmail.com
Mon Mar 28 14:07:00 GMT 2011


On Mon, Mar 28, 2011 at 3:29 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hi,
>
> The bitmap reg_set_bitmap is allocated in alloc_gcse_mem, but it is
> never freed. The foul smell of a mem leak...
>
> Plugged thus. Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for trunk?

Ok.

Thanks,
Richard.

> Ciao!
> Steven
>
>
> * gcse.c (free_gcse_mem): Free reg_set_bitmap.
>
> Index: gcse.c
> ===================================================================
> --- gcse.c      (revision 171599)
> +++ gcse.c      (working copy)
> @@ -657,6 +657,8 @@
>  static void
>  free_gcse_mem (void)
>  {
> +  FREE_REG_SET (reg_set_bitmap);
> +
>   free_modify_mem_tables ();
>   BITMAP_FREE (modify_mem_list_set);
>   BITMAP_FREE (blocks_with_calls);
>



More information about the Gcc-patches mailing list