> But even if I have a trigger that says me that the program gas started -
> how can I trace malloc/free? I can't use pid provider since it needs a
> hardcoded (from after-preprocessor point of view) pid value; and I don't
> know other way to trace malloc/free...

Have you tried libumem?!?

Make sure these environment variables are set prior to your program's
execution:

        LD_PRELOAD=libumem.so
        UMEM_DEBUG=default

it MAY find a lot of brokenness, however.  The default settings for libumem
are pretty brutal (it checks for use-of-freed-memory, e.g.).  Once your
program is running for a while, you can gcore or force it to coredump and use
mdb's "::findleaks" macro to see what's leaking.

Dan
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to