> Is there an easy way to record (get at) the whole
> function call stack at the moment of allocation
> (e.g. like purify gives)?
> Right now I just see the immediate caller of malloc
> which may be a bit too limited (cumbersome to work with)
> at times.

No, there isn't a way to get at that.  Malloc only saves
the caller of malloc and realloc.

> I've been adding 'setmalloctag(x, getcallerpc(&foo))'
> by hand in the source to slowly get to the caller
> of the caller of (the caller of ...) of malloc
> and could imagine there is a better way... ?

That's what I use.  If you allocate something and return it
to your caller and he has the responsibility to free it,
then call setmalloctag() to push that responsibility
onto him.

Or just think really hard.

Russ

Reply via email to