apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Marr <gr...@alum.wpi.edu>
Subject RE: [PATCH] APR Stackable Memory System
Date Mon, 21 May 2001 17:24:26 GMT
At 12:16 PM 05/21/2001, Cliff Woolley wrote:
>On Mon, 21 May 2001, Sander Striker wrote:
> > dreid>   Why not stick to the standard apr format of
> > dreid>
> > dreid>   apr_status_t abort_fn(char *sourcefile, int lineno);
> >
> > striker> Ahh, there is such a function? I need to do a lot of 
> digging into
> > APR.
>
>Hmm... yeah, that's a point.  Then again, if the abort_fn is 
>basically just abort(), then it's pretty easy to do a debugger 
>backtrace and get all the sourcefile/lineno information for the 
>entire call stack that way.

Assuming you have that debugging info available.  If you've stripped 
the executable, or didn't compile with any debug info, that won't 
work terribly well.

>   I really don't think we should be adding sourcefile/lineno 
> arguments to ALL of the SMS functions...

If you do this, then for those memory systems where you do have to 
call free, you can have a debug build where you track the filename 
and line number of each allocation, and when exiting, report the ones 
that were never freed.  I'm not sure if this would be at all useful 
in APR, though.  Do any of the memory systems require explicit calls 
to free, or is everything done through cleanups now?

-- 
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"


Mime
View raw message