Question

I am trying to allocate a 3rd party class (not written by me) in shared memory segment.

Dont know how is implemented this class but it may contain another "new", "malloc" calls to allocate memory for its needs.

Does it mean that this new memory will not be allocated inside the shared memory segment and will use standard heap - as a result forked processes will cause segmentation fault accessing functions of this class?

Was it helpful?

Solution

Does it mean that this new memory will not be allocated inside the shared memory segment and will use standard heap - as a result forked processes will cause segmentation fault accessing functions of this class?

Right. If the other class allocates it's own stuff using new, then that stuff won't be in your placement-new buffer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top