Simon Hayhurst (simon++at++nirvana.neu.sgi.com)
Mon, 11 Sep 1995 12:20:41 -0600
Lionel,
I'm a Performer novice, so excuse me if I'm wide of the mark ... but I think
that all you need to do is overload 'new' and 'delete'. I've used this in other
projects to allow new and delete to use home grown routines to give X-Process
objects / debug information.
Most good C++ references talk about how to do this (eg "C++ the Complete
Reference, 2nd Edition" by Osborne, ISBN 0-07-88212301, page 367).
void *operator new( size_t size
// , my_args Optional_Additional_Arguments
)
{
// Peform home grown allocation
// eg switch on additional args to do pfuNewXyz
return (void *)pointer_to_memory
}
similarly for delete
void operator delete(void *p)
{
// Perform home grown de-allocation
}
Simon
-- -------------------------------------------------------------------------------- Simon Hayhurst Phone (41)-38-433733 Supercomputing Technology Centre Fax (41)-38-433905 Core Technology Group Voice Mail 5-7269 SGI, Cortaillod, Switzerland Internet simon ++at++ neu.sgi.com --------------------------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:52 PDT