|
Boost Users : |
Subject: Re: [Boost-users] [interprocess] access dynamically accessed shared region in another process
From: Casimiro, Daniel C CIV NUWC NWPT (daniel.casimiro_at_[hidden])
Date: 2009-04-01 12:34:18
> To do this, I first create a shared segment and then a
> dynamic area in it. like this:
>
> struct transfer_buffer {
> void *buf;
> size_t bufsize;
> boost::interprocess::interprocess_mutex mutex;
> size_t dmember;
> }
I only quickly looked at your code, but I think that your void* pointer is
invalid in the second process.
Take a look at boost::interprocess::offset_ptr and use it in place of void*.
~Dan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net