Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!swrinde!ucsd!rutgers!mcnc!decvax.dec.com!zinn!nuucp From: mjv@objects.mv.com (Michael J. Vilot) Newsgroups: comp.lang.c++ Subject: Re: Making operator new smarter Message-ID: <944@zinn.MV.COM> Date: 23 Sep 90 17:30:40 GMT Sender: nuucp@zinn.MV.COM Lines: 22 Mark Terribilie pointed out that class-specific opertors new and delete can be tuned to provide efficient pool management. One small point I'd like to comment on: it's wise to use the forms: class Managed { public: ... void* operator new(size_t); void operator delete(void*, size_t); }; because these operators are inherited. That is, invoking `new' on a class derived from `Managed' will invoke Managed::operator new(), with the size of the derived class. Writing the pool management implementation used by new/delete should account for the fact that derived objects may be larger than base objects. -- Mike Vilot, ObjectWare Inc, Nashua NH mjv@objects.mv.com (UUCP: ...!decvax!zinn!objects!mjv)