From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 12:21:57 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 B352916A418 for ; Fri, 4 Jan 2008 12:21:57 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 3296713C46E for ; Fri, 4 Jan 2008 12:21:56 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.2/8.14.2) with ESMTP id m04CLs7k017200; Fri, 4 Jan 2008 15:21:54 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1199449314; bh=CPW+C7DpBO+rg76UTJXBzw3UnD78QweUs+3j6M2 9g7I=; l=507; h=Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent; b=svmdkCZaI3GbXhpUB7f/3PZdl7HsWmxMuL9ZV2Xg KE93y96dUydRtYA8Gq6Agd/mZW3t6yy/525t99SwosjpvOqpCrGR2t56CBr8h6KmFsV l2+Q41SgZF1PLfcjswqq1GL5aJcDY5raCiUrVwSMMiTXmezhiiLGccMn/HmL/a6g= Received: (from ache@localhost) by nagual.pp.ru (8.14.2/8.14.2/Submit) id m04CLqYk017199; Fri, 4 Jan 2008 15:21:53 +0300 (MSK) (envelope-from ache) Date: Fri, 4 Jan 2008 15:21:50 +0300 From: Andrey Chernov To: Jason Evans Message-ID: <20080104122149.GA17103@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Jason Evans , freebsd-current@FreeBSD.ORG, Poul-Henning Kamp References: <477C82F0.5060809@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <477C82F0.5060809@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-current@FreeBSD.ORG, Poul-Henning Kamp 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: Fri, 04 Jan 2008 12:21:57 -0000 On Wed, Jan 02, 2008 at 10:38:40PM -0800, Jason Evans wrote: > Poul-Henning noticed today that xchat fails to start if malloc uses sbrk > internally. Malloc() itself knows about memory amount _really_ in use by a program and could check it don't go beyond the limits, but for this it needs run-time check via getrlimit() call for each malloc() call (a program can use setrlimit() by itself). Traking direct mmap()s and sbrk()s outside of malloc() is also needed. -- http://ache.pp.ru/