From owner-freebsd-current@FreeBSD.ORG Tue Jan 8 00:06:35 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 3A06A16A419 for ; Tue, 8 Jan 2008 00:06:35 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id ADA5013C43E for ; Tue, 8 Jan 2008 00:06:34 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so4401046uge.37 for ; Mon, 07 Jan 2008 16:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=K4QJthPcj03nWhRNw9UWGOKI+k9Y4o7gHR3ILw2isxE=; b=NQimth5ZPrhdyYKBTKY03J/mcPG2894xrEeetoknIWOLQIVtxCJru65MNGMfx0xm2opX/DBU16KxX3B/pQz/JtQ6UDBMxrC8SgrKaM9yn1lt85pF3ZWCX09i7MJHZxc8A3iGT4dKpZpg/VMQPbGD3xPvspNYfli2af29FNHPyP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=BEf/cGUp9TU/BkZ4JLKzu4srjSou5kW1xX554ohwQSg/TbCsY7rbg5hVN4Nybu73m5Ze77fUeYaGcdcvLcgHMIHvLGZkc53InEhEt/JmZlHAh4lTffGAqgcGoCFpCiBw17PDggAf51QMyE5B0sSi12/03uOxU/W3BvpfwDaJsuw= Received: by 10.66.221.18 with SMTP id t18mr50707ugg.80.1199750793513; Mon, 07 Jan 2008 16:06:33 -0800 (PST) Received: by 10.66.248.11 with HTTP; Mon, 7 Jan 2008 16:06:33 -0800 (PST) Message-ID: Date: Tue, 8 Jan 2008 00:06:33 +0000 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Andrew Reilly" In-Reply-To: <20080108101942.05471233@duncan.reilly.home> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <10319.1199711927@critter.freebsd.dk> <20080108101942.05471233@duncan.reilly.home> X-Google-Sender-Auth: cc9c200272b8bd92 Cc: Kostik Belousov , Peter Jeremy , Poul-Henning Kamp , freebsd-current@freebsd.org 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: Tue, 08 Jan 2008 00:06:35 -0000 On 07/01/2008, Andrew Reilly wrote: > On Mon, 07 Jan 2008 13:18:47 +0000 > "Poul-Henning Kamp" wrote: > > > Yes, but you will not see this complication, it will be hidden > > in the implementation of malloc(3). > > How could you hide it inside malloc? Would malloc start > returning 0 after receiving the "less mem than desirable" > signal? Would it ever go back to returning non-zero? I'm with Andrew on this one. The only (sensible) way I could see it being hidden behind malloc() is if malloc() blocks until sufficient memory becomes available. I thought the real idea behind SIGDANGER was to tell the kernel "I kind of know what I'm doing, so if you gonna kill something don't kill me" and that was achieved by AIX not SIGKILLing processes that had sigaction(SIGDANGER) != SIG_IGN. Igor :-)