This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] allow ggc_calloc pass the MEMstats
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 27 Nov 2004 12:03:48 -0800
- Subject: Re: [PATCH] allow ggc_calloc pass the MEMstats
- References: <4E164775-3FF0-11D9-941D-000A95D692F4@physics.uc.edu>
Andrew Pinski <email@example.com> writes:
> I noticed this while looking into ways of reducing the GC memory
> usage for PR 12850.
> We are not recording where ggc_calloc is called at all but we are just
> saying it comes from ggc-common.c which is wrong for most cases.
> This fixes the problem by passing MEMSTATS. I had to keep a ggc_calloc
> still because we use that we need to for hashtable stills.
> Yes this is not a regression but a very light weight (safe) fix which
> can help a lot finding memory allocation problems.
> OK? Bootstrapped and tested on powerpc-darwin with no regressions.
This is OK.
> Andrew Pinski
> * ggc.h (ggc_calloc_stat): Declare.
> (ggc_calloc): New macro calling ggc_calloc_stat.
> * ggc-common.c (ggc_calloc_stat): New function.
> (ggc_calloc): Wrap name with ().