From owner-freebsd-current@FreeBSD.ORG Thu Jan 3 22:46:10 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 DD84216A418 for ; Thu, 3 Jan 2008 22:46:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 7338113C4E7 for ; Thu, 3 Jan 2008 22:46:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227195563-1834499 for multiple; Thu, 03 Jan 2008 17:44:16 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m03Mk709031519; Thu, 3 Jan 2008 17:46:07 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 3 Jan 2008 17:46:14 -0500 User-Agent: KMail/1.9.6 References: <477C82F0.5060809@freebsd.org> <863ateemw2.fsf@ds4.des.no> <477D6078.5030805@samsco.org> In-Reply-To: <477D6078.5030805@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200801031746.15225.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 03 Jan 2008 17:46:07 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5351/Thu Jan 3 15:30:12 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= , Jason Evans 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, 03 Jan 2008 22:46:10 -0000 On Thursday 03 January 2008 05:23:52 pm Scott Long wrote: > Dag-Erling Sm=F8rgrav wrote: > > Jason Evans writes: > >> [sbrk is broken] > >=20 > > The real question is why we would revert perfectly good code (jemalloc) > > from using a modern interface to using one that has been obsolete for > > twenty years, and marked as such in the man page for seven years. > >=20 > > If rwatson@ wants malloc() to respect resource limits, he can bloody > > well fix mmap(). Until he does, the datasize limit is a joke anyway, as > > anyone can circumvent it by either using mmap() instead of malloc() or > > setting _malloc_options before calling malloc(). > >=20 >=20 > That is a pretty damning argument in my mind. Why make such a major=20 > change right before the release when it's effectively useless? The motivation for the change is to preserve POLA as malloc() does honor=20 RLIMIT_DATA in previous releases (4.x, 6.x, etc.). That said, I think=20 RLIMIT_VMEM is probably more useful going forward. I know at work we have= =20 lots of hacks to deal with maxdsiz and trying to allow apps that use large= =20 malloc() and large mmap both cooperate. Having one resource limit for mall= oc=20 + mmap is probably best for the future. =2D-=20 John Baldwin