From owner-freebsd-hackers Sun Jul 7 17:00:40 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA22736 for hackers-outgoing; Sun, 7 Jul 1996 17:00:40 -0700 (PDT) Received: from kropotkin.gnu.ai.mit.edu (kropotkin.gnu.ai.mit.edu [128.52.46.40]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id RAA22731 for ; Sun, 7 Jul 1996 17:00:38 -0700 (PDT) Received: by kropotkin.gnu.ai.mit.edu (8.6.12/8.6.12GNU) id UAA24967; Sun, 7 Jul 1996 20:00:26 -0400 Date: Sun, 7 Jul 1996 20:00:26 -0400 Message-Id: <199607080000.UAA24967@kropotkin.gnu.ai.mit.edu> To: rminnich@Sarnoff.COM CC: hackers@freebsd.org In-reply-to: (rminnich@Sarnoff.COM) Subject: Re: filemalloc etc. for shared memory between processes From: Joel Ray Holveck Reply-to: joelh@gnu.ai.mit.edu Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > These allow you to set up a shared mapped file for use by multiple > processes in the malloc and calloc style. Tested and used > extensively in my latest DSM. Comments would be appreciated if > I've made mistakes in here! note that if the file exists it is > used. What about using one mmap'd region, then dividing it up malloc-style (see Knuth) instead of constanly mmapping lots of possibly tiny files? It may be good to look at mmalloc (distributed with gdb) for using malloc with mmap. Another advantage of this is that the regions filemalloc()'d can hold pointers as offsets to the start of the mapped region that would hold valid for all processes. -- http://www.wp.com/piquan --- Joel Ray Holveck --- joelh@gnu.ai.mit.edu Fourth law of computing: Anything that can go wro .signature: segmentation violation -- core dumped