Are your processes all created by fork() or are they unrelated? If they're
all descendants of the same process, take a look at the GNU mm library
(which is loosely based on structure of the mm_malloc library I wrote for my
company but couldn't release).

http://www.engelschall.com/sw/mm/

If they're unrelated, you'll have to use SysV.

Charles

-----Original Message-----
From: fergus [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 18, 2001 4:57 AM
To: hackers
Subject: shared memory models/techniques


hope this is an ok place to post this.

as far as i can tell there are three ways to share memory between processes
-
using mmap, ipc shared mem or skip it using threads instead.

is this right?

basically i have a server process accepting many connections & i was using
threads, however, it doesn't really make sense processes would probably be
simpler with shared mem.  i was going to use IPC but don't like building
uncessesary dependancies (i.e. it's a kernel option).

is mmap the best way to do this?  why would you use ipc instead?

. . . and finally (milking the assistance to the last) is there a really
simple app using shared mem resources that anyone knows about so i can
butcher
it?

thanks in advance.

fergus

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to