T
Tomasz Grobelny
Is it possible to create for example stl queue in previously allocated
memory buffer (memory shared between two processes)? I thought of sth like
that:
queue<int>* q=new(buffer) queue<int>;
but won't integer variables (and possible others needed by queue object) be
allocated using default allocator outside the buffer? How to force
allocation in specified buffer? Access to shared memory is protected by
semaphores so the should be no problem with amount of requested memory. And
how do I force the second program to view the buffer as queue<int>? Is
casting enough?
Tomek
memory buffer (memory shared between two processes)? I thought of sth like
that:
queue<int>* q=new(buffer) queue<int>;
but won't integer variables (and possible others needed by queue object) be
allocated using default allocator outside the buffer? How to force
allocation in specified buffer? Access to shared memory is protected by
semaphores so the should be no problem with amount of requested memory. And
how do I force the second program to view the buffer as queue<int>? Is
casting enough?
Tomek