> We like to design a software in certain module way. For example,
> a libForwardTableManager.so for infiniband switch manager
> might manager 128 MBytes of share memory data. 10 or more
> applications will call the APIs in the libForwardTableManager.so
> to get/set the forward table data.
>[...]
> What I like to do is to use the mprotect() api to turn on/off the
> memory read/write access to the globally share memory. This
> way, the only possible memory corruption to the share table
> is from the APIs in the libForwardTableManager.so
Tony, I think you need to rethink your API.
E.g. what does the switch manager do and why did you
decide to keep any data in a shared memory, of all things?
Why do you need several applications to access the
switch forwarding table? Perhaps, if you answer those
questions, you do not need to bang mprotect() so hard
anymore.
-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/