Re: [info-performer] Allocating classes from shared memory

Date view Thread view Subject view Author view

From: Marc Mendez (mmendez++at++silicon-worlds.fr)
Date: 09/26/2003 00:57:01


Goncalo Nuno Moutinho De Carvalho wrote:

>pfHey,
>
>
pfYep !

>>I ve written a C++ app here that required to redefine >the operator new()
>>for every object to remove the messages "Can't free >non PF memory"
>>although every object was deriving pfObject.
>>
>>
>
>Well, operator new is inherited when you derive. I believe for pfMemory objects operator new is overloaded
>
I was not sure at all about the operator new inheritance...

>to use the shared arena. I certainly derived a lot of new nodes from existing ones and didn't have any problems in multiprocessing mode. The same think happened with pfObject if I'm not mistaken. But then most of the times I don't need to delete them.
>
>In what context do you get that message?
>
>
When using pfMemory::free() on objects that inherit pfObject. Redifining
the new operator in every subclasses cancelled those messages.
I would have liked to prepare you a sample code, but the application is
getting huge and cutting a piece of cake would be complicated ... but if
you insist ;)

regards,
-- Marc.

-- 
Marc Mendez
Silicon Worlds SA

12, rue de Chatillon 75014 Paris Tel : +33 (01) 53 90 11 11 Fax : +33 (01) 53 90 11 12

Without C, we would only have Basi, Pasal and Obol. Anonymous. Computers are useless. They can only give you answers. P. Picasso.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Sep 26 2003 - 01:04:33 PDT