From owner-freebsd-stable@FreeBSD.ORG Tue Dec 20 14:31:49 2011 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 393801065670; Tue, 20 Dec 2011 14:31:49 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: from data.galacsys.net (webmail.galacsys.net [217.24.81.215]) by mx1.freebsd.org (Postfix) with ESMTP id F1E888FC0C; Tue, 20 Dec 2011 14:31:48 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by data.galacsys.net (Postfix) with ESMTP id 27269171372; Tue, 20 Dec 2011 15:31:48 +0100 (CET) From: "Ganael LAPLANCHE" To: Andriy Gapon , Tijl Coosemans X-Openwebmail-Date: Tue, 20 Dec 2011 16:31:48 +0200 Message-Id: <20111220142740.M29405@martymac.org> In-Reply-To: <20111220134716.M62917@martymac.org> References: <20111220080437.M63044@martymac.org> <4EF05F27.8030902@FreeBSD.org> <20111220134716.M62917@martymac.org> X-Mailer: Open WebMail 2.01 20030425 X-OriginatingIP: 157.99.64.43 (ganael.laplanche@martymac.org) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Date: Tue, 20 Dec 2011 15:31:48 +0100 (CET) Cc: freebsd-stable@FreeBSD.org Subject: Re: Using mmap(2) with a hint address X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:31:49 -0000 On Tue, 20 Dec 2011 15:02:01 +0100 (CET), Ganael LAPLANCHE wrote > But there is still something I don't understand : on the Linux > machine where I ran my test program, the current RLIMIT_DATA > is set to 0xffffffff/0xffffffff and I can manage to mmap at > address 0x20000000. If I set the same limit on FreeBSD, I > won't get the mapping at 0x20000000. So, there *is* a > difference of behaviour between the two systems, but I don't > understand why. Well, in fact, two things remain not very clear for me : - Why are mmap()s performed *after* data segment ? => It seems they can go within, on GNU/Linux and NetBSD. - Why do we have such a default value for datasize (8.2, amd64) : $ limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB this is HUGE ! -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org