Shared memory and IPC

David Collier-Brown davecb at
Fri Sep 7 04:31:05 GMT 2001

Luke Kenneth Casson Leighton wrote:
> the only tricky bit is, and this is relevant i should
> imagine to doing shared, complex data structures in samba,
> an also a possible solution to some of the issues
> in APR, how do you guarantee that multiple processes -
> no, _all_ processes - get access to the same fixed address
> memory segment / segments?
> i wasn't aware that mmap could do fixed memory segments,
> otherwise i would have suggested (on apr dev) an sms_shmem
> that used shared memory.

	That's why you don't see it being used heavily
	this way: the MAP_FIXED mode of operation was
	a rather eaaly idea, to support PL1-like
	constructs, wasn't used heavily and has been
	broken in various vendors implementation
	a lot!  The one I work for didn't get it right
	until Solaris 5.5.1, which was the first 
	release that the Siemens large-scale imaging
	system would run on, because it used MAP_FIXED
	mmaps for proccess-independant IPC structs.

David Collier-Brown,           | Always do right. This will gratify 
Americas Customer Engineering, | some people and astonish the rest.
SunPS Integration Services.    |                      -- Mark Twain
(905) 415-2849                 | davecb at

More information about the samba-technical mailing list