On Mon, Jul 02, 2001 at 07:10:27PM +0200, Sander Striker wrote: > > On Mon, Jul 02, 2001 at 09:38:37AM -0700, Ian Holsman wrote: > > > Just wondering if any has got one of these going, > > > > > > how does the proposed SMS shared library handle pointers? > > > > Can you please expand a bit further on what you mean? > > > > Oh, do you mean, "How does the proposed SMS shared memory system > > handle pointers in data structures that it has?" Oh, that, I dunno. > > Prolly with some type of offset/fixup routine. But, that may not > > be ideal. -- justin > > We basically still need to work that out :) > I'm personally still not sold on the offsets idea. I'm still not > getting _why_ we would need offsets instead of a simple pointer > to a piece of mem.
when you request that a shared memory space be mapped into real memory on different processes, it is extremely unlikely that it will be mapped to the *same* physical location in memory on each process (probability: 2^^-32 or 2^^-64...) so therefore, if you store any pointers from one process _into_ the shared memory block, when they are retrieved by _another_ process, they will of course point to garbage. there are a number of techniques for dealing with this, but basically they boil down to structure-packing, effectively treating the memory exactly as you would a very very fast file. all best, luke
