From owner-freebsd-current@FreeBSD.ORG Wed Aug 4 22:27:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4E3A16A4CE for ; Wed, 4 Aug 2004 22:27:21 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FDA043D6E for ; Wed, 4 Aug 2004 22:27:21 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.102] (ddsl-66-42-172-210.fuse.net [66.42.172.210]) (authenticated bits=0)i74MG0jr051042 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 4 Aug 2004 18:16:02 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: John Birrell Date: Wed, 4 Aug 2004 18:28:02 -0400 User-Agent: KMail/1.6.2 References: <200407271731.12282.mistry.7@osu.edu> <200407291004.19726.mistry.7@osu.edu> <20040729211209.GH34260@freebsd3.cimlogic.com.au> In-Reply-To: <20040729211209.GH34260@freebsd3.cimlogic.com.au> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200408041828.26762.mistry.7@osu.edu> X-Spam-Status: No, hits=-4.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE, QUOTED_EMAIL_TEXT,RCVD_IN_ORBS,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_KMAIL version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-current@freebsd.org Subject: Re: FreeBSD and wine mmap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2004 22:27:22 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 29 July 2004 05:12 pm, you wrote: > On Thu, Jul 29, 2004 at 10:04:12AM -0400, Anish Mistry wrote: > > I should have a bit of time, once I get the acpi_fuji driver cleaned up > > and Nate or Mark can import it. Which direction capitan? :) > > Look in /usr/src/sys/vm/vm_mmap.c:mmap() for the comment: > > /* > * XXX for non-fixed mappings where no hint is provided or > * the hint would fall in the potential heap space, > * place it after the end of the largest possible heap. > * > * There should really be a pmap call to determine a reasonable > * location. > */ > > The code currently maps memory without a fixed address above the highest > address that the process has used. > > The problem with Wine is that it needs to reserve the top half of the > process address space for use like older versions of Windows. When Wine > starts up, it goes through and grabs that memory as soon as it can, then > it proceeds to dynamically load it's libraries (the Unix shared libraries > that implement the functions in the DLLs). The first load fails because > the library can't be mapped above the highest address used. > > What you need to do is take the hint from the comment above and write a > pmap function to determine a reasonable location. You could say that > a reasonable location is above the highest address used, if there is > space up there. Otherwise find a hole in the address space. Ok, so we need something like vm_map_findspace(), but for process address=20 mapping? ie. pmap_findspace() that will return an address to a large enoug= h=20 free chunk? =2D --=20 Anish Mistry =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBEWL8xqA5ziudZT0RAkvlAJ0eNZx0JD5gbkYW9gKoGP4ouNexMACglLAp uSyYfUKUzIq0xm9GZqJ5G3I=3D =3DjkUH =2D----END PGP SIGNATURE-----