From owner-freebsd-current@FreeBSD.ORG Thu Jan 10 10:04:13 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF1B16A418 for ; Thu, 10 Jan 2008 10:04:13 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id D585013C467 for ; Thu, 10 Jan 2008 10:04:12 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2E8602089; Thu, 10 Jan 2008 11:04:04 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 005E12049; Thu, 10 Jan 2008 11:04:00 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id D043E8449F; Thu, 10 Jan 2008 11:04:00 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Schuller References: <15094.1199751424@critter.freebsd.dk> <200801080237.40379.peter.schuller@infidyne.com> <86tzlonozc.fsf@ds4.des.no> <200801091922.56670.peter.schuller@infidyne.com> Date: Thu, 10 Jan 2008 11:04:00 +0100 In-Reply-To: <200801091922.56670.peter.schuller@infidyne.com> (Peter Schuller's message of "Wed\, 9 Jan 2008 19\:22\:47 +0100") Message-ID: <863at6j8tr.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Andrew Reilly , Peter Jeremy , Poul-Henning Kamp , freebsd-current@freebsd.org, Igor Mozolevsky , Kostik Belousov Subject: Re: sbrk(2) broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 10 Jan 2008 10:04:13 -0000 Peter Schuller writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Actually, malloc(3) can use madvise(2) to notify the kernel that > > arbitrary pages in the arena are unused and can be discarded. The > > current implementation will do so if the H option is specified. > However, in this context it will likely only help partially since you sti= ll > need a full page to be free (and with a lot of programs many allocations = will > be significantly smaller than that, and I have to assume no real-life mal= loc > will align all allocations to pages, or the overhead would be extreme). Page-aligning every allocation would be supremely stupid, and jemalloc does so only for allocations larger than a page. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no