Date: Thu, 22 Dec 2011 11:22:47 +0100 (CET) From: "Ganael LAPLANCHE" <ganael.laplanche@martymac.org> To: Artem Belevich <art@freebsd.org>, Tijl Coosemans <tijl@coosemans.org> Cc: freebsd-stable@freebsd.org Subject: Re: Using mmap(2) with a hint address Message-ID: <20111222101830.M52727@martymac.org> In-Reply-To: <CAFqOu6h=kuh2HrVo01mS6u8N1R-q3Sjxjj6cbk2jFiXnzSSgKw@mail.gmail.com> References: <20111220080437.M63044@martymac.org> <4EF05F27.8030902@FreeBSD.org> <20111220134716.M62917@martymac.org> <20111220142740.M29405@martymac.org> <4EF0A3A7.80309@FreeBSD.org> <CAFqOu6h=kuh2HrVo01mS6u8N1R-q3Sjxjj6cbk2jFiXnzSSgKw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <ganael.laplanche@martymac.org> http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111222101830.M52727>