From owner-freebsd-emulation Wed Apr 28 21: 4: 7 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id D060014BF7 for ; Wed, 28 Apr 1999 21:04:05 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id XAA11663; Wed, 28 Apr 1999 23:59:04 -0400 (EDT) (envelope-from luoqi) Date: Wed, 28 Apr 1999 23:59:04 -0400 (EDT) From: Luoqi Chen Message-Id: <199904290359.XAA11663@lor.watermarkgroup.com> To: andrew@lake.com.au Subject: Re: Wine, Win32 stripped executables vs FreeBSD mmap() Cc: freebsd-emulation@FreeBSD.ORG, nox@jelal.kn-bremen.de Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I'll send the patch to the Wine folk, to see if they want to try > it, but if you have any thoughts about why mmap was ignoring my > address "hint", I'd be keen to hear them. > mmap() is ignoring hint that's below data heap and its potential growth area. While it works fine for a.out executables because there is no useable space below data heap, this is no longer true for elf executables. Please try this patch, Index: vm/vm_mmap.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_mmap.c,v retrieving revision 1.94 diff -u -r1.94 vm_mmap.c --- vm_mmap.c 1999/04/27 11:18:49 1.94 +++ vm_mmap.c 1999/04/29 03:47:28 @@ -228,7 +228,9 @@ * There should really be a pmap call to determine a reasonable * location. */ - else if (addr < round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ)) + else if (addr == 0 || + addr >= round_page((vm_offset_t)p->p_vmspace->vm_taddr) && + addr < round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ)) addr = round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ); if (flags & MAP_ANON) { > -- > Andrew > -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message