When malloc() dynamically loads
tvheap_mr.a, it should find the library in
path_mr. When
tvheap_mr.a dynamically loads
tvheap.a, it should find it in
path.
The AIX linker allows you to relink executables. This means that you can make an already complete application ready for the MemoryScape agent; for example:
Index 0 in the Import File Strings section shows the search path the runtime loader uses when it dynamically loads a library. Some systems propagate the preload library environment to the processes they will run; others, do not. If they do not, you need to manually link them with the
tvheap library.
In some circumstances, you might want to link your program instead of setting the
MALLOCTYPE environment variable. If you set the
MALLOCTYPE environment variable for your program and it uses
fork()/
exec() a program that is not linked with the agent, your program will terminate because it fails to find
malloc().