From owner-freebsd-hackers Sat May 13 8:46:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sharmas.dhs.org (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id 05E9E37B9CD for ; Sat, 13 May 2000 08:46:36 -0700 (PDT) (envelope-from adsharma@sharmas.dhs.org) Received: (from adsharma@localhost) by sharmas.dhs.org (8.9.3/8.9.3) id IAA15713; Sat, 13 May 2000 08:46:13 -0700 Date: Sat, 13 May 2000 08:46:13 -0700 From: Arun Sharma Message-Id: <200005131546.IAA15713@sharmas.dhs.org> To: nathan@khmere.com Cc: freebsd-hackers@freebsd.org Subject: Re: mremap help ? or no support for FreeBSD ? so do what ? In-Reply-To: <391D39E0.934224E4@khmere.com> References: <391D39E0.934224E4@khmere.com> Reply-To: adsharma@sharmas.dhs.org.nospam Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In muc.lists.freebsd.hackers, you wrote: > I know that this was discussed in the past but I can't find out what to > do ? > > In Linux if I have to resize a mmap 'ed object I can just use mremap.... > but in FreeBSD if, I want to resize it what do I do ? Have you tried mmap'ing the file again at the same address, but with a larger length ? As I see it, the only advantage of using mmap instead of read/write interface is to avoid the extra system calls. However, by calling mremap or mmap repeatedly, you're losing that advantage. I think you're better off by extending your map in larger chunks, reducing the number of mmap/mremap calls. If you have a big enough address space, just use a large mmap region to begin with. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message