Shared memory and IPC
Wez Furlong
wez at thebrainroom.com
Fri Sep 7 02:10:02 GMT 2001
On 06/09/01, "Peter Samuelson" <peter at cadcamlab.org> wrote:
> [Wez Furlong]
> > And how do you tell if a range is mapped in your address space?
>
> Hmmm, you could trap SIGSEGV and SIGBUS and then read from the address.
> [evil grin]
> Or, try to mmap without MAP_FIXED and tell the peer process to try that
> address ... repeat if fail ... and of course unmap the unused mappings
> later.
> On Linux you can open /proc/self/maps and parse that. Not exactly the
> most portable solution, of course!
So there is no nice-n-easy syscall then? Even a non-portable call would
be better than parsing /proc/self/maps.
:-(
--Wez.
More information about the samba-technical
mailing list