Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2000 00:26:30 -0600
From:      Warner Losh <imp@village.org>
To:        "Shawn Workman" <shawn@holdenz.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Sharing memory between processes. 
Message-ID:  <200006190626.AAA54456@harmony.village.org>
In-Reply-To: Your message of "Sun, 18 Jun 2000 23:06:24 PDT." <007301bfd9b4$8018c1b0$b2a612d8@hayden> 
References:  <007301bfd9b4$8018c1b0$b2a612d8@hayden>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <007301bfd9b4$8018c1b0$b2a612d8@hayden> "Shawn Workman" writes:
:     Is there a way to give a client app access to another apps memory?  =

Yes.  It is called system V shared memory.  mmap will also be able to
do that as well, if you use a backing file (is that still required?)

:     I have used the shm* functions and from what I see I am limited to =
: the number of shared memory pointers I can have.

You are limited by the number of shared memory areas you can have, and 
their size.  You can have any number of pointers into this memory that
you want.  You'll need to come up with some kind of wrapper for this
stuff as well.  Also, there are no guarantees, iirc, that the shared
memory segment will be at the same virtual address in both processes,
so pointers in one program won't work in the other w/o a translation,
which can be, ahhhh, tricky.

:     I would really appreciate any help that could be provided here.  I =
: have been looking at the possibility of an lkm but hear that this can =
: cause the system to become unstable..

Just use shm*.  You will be much happier.  Trust me.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006190626.AAA54456>