On Thu, Aug 02, 2007 at 01:58:54PM +0200, [EMAIL PROTECTED] wrote: > > Such shared data will need to be created and maintained specifically by > the library, e.g., by creating a POSIX shared memory region and using that. > > (And do you want this per-user or per-system?) > Heh, good question. I asked about this feature because I want to adapt libumem to work with shared memory segments. Since libumem uses some static data (which _is_ shared between threads in one executable, and thus has to be shared between processes operating over SHM), this seemed as an easy (albeit a bit dirty) fix.
[My intention is to use MAP_FIXED in all participating processes, so there should be no problems with pointers.] > >2. Is it possible to "upgrade" MAP_PRIVATE pages to MAP_SHARED pages w/o > >changing their contents and base address? > > No. But you can "remap" stuff on top of it. > Hmm, what do you mean by "remapping on top" ? I asked this question because another way of accomplishing the same thing occured to me: making a non-PIC executable, and mapping it (ie. asking the dynamic linker to to the job) at the same address (= executable's load virtual address) in all participating processes. But it doesn't seem possible to influence dynamic linker's choice of page permissions (modulo recompiling it from the source). Apart from that, I could use libelf to manually lookup functions I need, after mapping the executable in memory. Maybe the simplest way turns out to be just to bite the bullet and do the job the "right way" - remove all relevant static data references from libumem... Thanks for your answer. Best regards, Zeljko. _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
