From owner-freebsd-hackers Sat May 13 12: 8:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id E1D8037B92E for ; Sat, 13 May 2000 12:08:35 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id MAA01426; Sat, 13 May 2000 12:08:35 -0700 (PDT) (envelope-from dillon) Date: Sat, 13 May 2000 12:08:35 -0700 (PDT) From: Matthew Dillon Message-Id: <200005131908.MAA01426@apollo.backplane.com> To: Arun Sharma Cc: nathan@khmere.com, freebsd-hackers@FreeBSD.ORG Subject: Re: mremap help ? or no support for FreeBSD ? so do what ? References: <391D39E0.934224E4@khmere.com> <200005131546.IAA15713@sharmas.dhs.org> 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 The linux mremap() is an idiotic system call. Just unmap the file and re-mmap it. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message