Shared memory and IPC

John E. Malmberg malmberg at
Thu Sep 6 06:54:23 GMT 2001

On Wed, 5 Sep 2001, Luke Kenneth Casson Leighton wrote:

> > Now, the other thing is that COM provides a means to allocate shared
> > memory using it's IMalloc interface (well, you can ask for a shared
> > memory implementation of IMalloc).  I'd like to provide this in our COM
> > implementation; the problem is that I think we need to implement a
> > full blown "malloc manager" for the shared memory to support malloc,
> > free, realloc etc. etc.  Memory allocated using the COM IMalloc must
> > be passable directly to another process (ie: appear at the same address),
> > so I think we might need a COM-wide shared memory context of some kind.
> holy cow.  i'm cc'ing this out to a number of lists i know of in
> case someone can answer authoritatively.
> does anyone else know how this could be done?
> is it possible to get memory allocated in one process to be shared
> with another process *at the same address* on unix, os/2, nt, vms etc?

With OpenVMS it it possible, and not really difficult to do.

It is generally not desirable to have fixed addresses shared between
processes, as you need to understand where everything that can possibly
allocate an address range is going to put things.

Is there some way that relative pointers can be used inside the shared
memory, and the functions that access the pointers know what the base
address is?
wb8tyw at
Personal Opinion Only
(Only on samba-technical list)

More information about the samba-technical mailing list