placement-new and 3rd party controlled allocations

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?

Answers


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.


Need Your Help

Induce WCF openTimeout closeTimeout

wcf timeout

I wish to test and observe timeout behaviours between a WCF client and service host. For receiveTimeout and sendTimeout, it is probably easy to transmit a large byte stream that takes more than a few

can i access a web server via virtual block in enginx?

azure vpn vps octoprint

so Im not sure how to describe it. I want to access my octoprint server via my personal website as a subdomain or direcotry. I am running nginx on an ubuntu 14.5.2 server on a VPS. The octoprint se...