Daniel C. Williams X-2453 (dcw++at++sarnoff.com)
Fri, 5 Jul 1996 17:36:47 -0400 (EDT)
Performer uses functions from the amalloc(3p) library to place many of its
objects in the shared memory arena that it creates. If all Performer stages
are in one process this is unnecessary; if we could fool Performer into
placing those objects on the heap instead Purify would be able to trace
them.
We fool Performer by writing a module that defines our own versions of
most of the functions from the amalloc(3p) library, but not acreate nor
adelete. All the other functions from the amalloc(3p) library take an
arena pointer as an argument. In each of our functions we compare the
arena pointer argument to the value returned by pfGetSharedArena(). If
they are equal we call the corresponding function from the non-shared
memory library malloc(3c), i.e., for a call to acalloc we instead call
calloc. If the pointers are unequal we forward the call unmolested
to the real implementation, i.e., for a call to acalloc we call
_acalloc.
The resulting object file should be linked just before -lmalloc and -lc.
Remember, this only works if all Performer stages are in one process.
One other thing: "-pointer-offset=16" is a good option to give to Purify
to eliminate spurious PLKs; see /usr/include/Performer/pr/pfMemory.h for
why this is so.
Good luck,
Dan
--
Daniel Williams, Independent Consultant
Voice: (215) 885-1573
Email: dcw++at++sarnoff.com, dan++at++sass.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ <--new!
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:09 PDT