From owner-freebsd-stable@FreeBSD.ORG Thu Dec 22 10:22: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 B8D05106566B; Thu, 22 Dec 2011 10:22: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 3A0A98FC15; Thu, 22 Dec 2011 10:22:49 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by data.galacsys.net (Postfix) with ESMTP id DDF9E16D166; Thu, 22 Dec 2011 11:22:47 +0100 (CET) From: "Ganael LAPLANCHE" To: Artem Belevich , Tijl Coosemans X-Openwebmail-Date: Thu, 22 Dec 2011 12:22:47 +0200 Message-Id: <20111222101830.M52727@martymac.org> In-Reply-To: References: <20111220080437.M63044@martymac.org> <4EF05F27.8030902@FreeBSD.org> <20111220134716.M62917@martymac.org> <20111220142740.M29405@martymac.org> <4EF0A3A7.80309@FreeBSD.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: Thu, 22 Dec 2011 11:22:47 +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: Thu, 22 Dec 2011 10:22:49 -0000 Hi Artem, Tijl, On Tue, 20 Dec 2011 09:27:43 -0800, Artem Belevich wrote > Something like that. [...] > These days malloc() by default uses mmap, so if you don't force it to > use sbrk() you can probably lower MAXDSIZE and let kernel use most > of address space for hinted mmaps. > [...] On Tue, 20 Dec 2011 18:45:08 +0100, Tijl Coosemans wrote > I don't know about NetBSD but Linux maps from the stack > downwards when there's no hint and FreeBSD maps from the > program upwards. [...] > malloc(3) used to be implemented on top of brk(2) so the size was > increased on amd64 so you could malloc more memory. Nowadays malloc > can use mmap(2) so a large datasize isn't really needed anymore. I will use setrlimit(2) to lower datasize then. Thanks a lot for your time and explanations, Best regards, -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org