mprotect() api overhead.
Quoted 13 lines
From: <[email protected]>
Date: Fri, 22 Mar 2002 22:10:20 PSTWe 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 themprotect()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