HI

I have created an object pool in shared memory
each object encapsulates another object which in turn has a socket object which is a pointer

Now my question is, should the socket object be created in the same memory region (using overloaded new) as that of pool object or it can be created normally using a new operator.

which is better and how to implement that
please explain me with suitable example with source code

Thanks in Advance
Vadan

You won't get any source... and you'll have to read your textbook, but think for a moment:

Should objects in shared memory be referencing things in the private memory of any process or thread?

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.