Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 1996 19:00:32 -0400
From:      Joel Ray Holveck <joelh@gnu.ai.mit.edu>
To:        stesin@elvisti.kiev.ua
Cc:        hackers@freebsd.org
Subject:   Re: filemalloc etc. for shared memory between processes
Message-ID:  <199607082300.TAA28262@kropotkin.gnu.ai.mit.edu>
In-Reply-To: <199607080957.MAA19692@office.elvisti.kiev.ua> (stesin@elvisti.kiev.ua)

next in thread | previous in thread | raw e-mail | index | archive | help

  >> What about using one mmap'd region, then dividing it up
  >> malloc-style
  > 	I wonder how one should properly implement locking of memory
  > regions in this case. Will appropriate fcntl(2) be enough?

It will work, but is slow.  Instead, use msleep() and friends.  You'd
need to have the malloc/free also do locking; simply using mmalloc()
or something of the like could result in a corrupt arena, unless the
apps really have their algorithms together.

-- 
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



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