Debugging Dynamic Memory Usage Errors Using HP WDB
NOTE: If the application invokes calls such as system(3s), and popen(), which invoke
a new shell, librtc.[sl|so] must not be loaded to the invoked shell. You must use
LD_PRELOAD_ONCE, instead of LD_PRELOAD, to exclusively load thelibrtc.[sl|so] file
to the calling process only.
Following is the syntax for using LD_PRELOAD_ONCE:
LD_PRELOAD_ONCE= /opt/langtools/lib/librtc.sl
Example 15 (page 61) illustrates the batch mode debugging of the memtest.c program. The
debugging results are stored in memtest.8494.mem, memtest.8494.heap, and
memtest.8494.leak.
60