[asterisk-dev] Re: [asterisk-commits] russell: branch 1.2 r38288
- /branches/1.2/channels/chan_sip.c
Kaloyan Kovachev
kkovachev at varna.net
Thu Jul 27 00:34:16 MST 2006
On Thu, 27 Jul 2006 02:00:56 -0400, Russell Bryant wrote
> On Wed, 2006-07-26 at 21:01 -0500, Kevin P. Fleming wrote:
> > Should we just move this into a common place, now that it's being repeated
in quite a few places?
>
> I certainly think that would be a good idea. I just couldn't decide
> where to put it. Then, I just decided to at least have the bugs
> fixed until I had an idea for what to do with it.
>
As for the part
#ifdef __AST_DEBUG_MALLOC
static void FREE(void *ptr)
{
free(ptr);
}
#endif
i think it is enough to define it in astmm without #ifdef __AST_DEBUG_MALLOC
at all (it is set there). The rest of the wrapers are in utils.h, so it is
probably the best place.
p.s. Yes, it did fixed the bugs
> > Alternatively, since we have ast_malloc/ast_calloc, should we have
ast_free (not in 1.2, of course)?
there are lots of places where free() is used directly, so it will also make
it easier to separate them.
>
> I suppose. However, I'm not sure how beneficial it would be other than
> for matching the naming convention of the allocation wrappers.
> There is obviously no error checking we can do on a call to free(),
> so we can't inject an Asterisk log message or anything.
>
> --
> Russell Bryant
> Software Developer
> Digium, Inc.
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list