From owner-freebsd-current@FreeBSD.ORG Mon Jan 7 13:18:50 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 269A416A418 for ; Mon, 7 Jan 2008 13:18:50 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id D8B5413C467 for ; Mon, 7 Jan 2008 13:18:49 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 76AA817105; Mon, 7 Jan 2008 13:18:48 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m07DIlTf010320; Mon, 7 Jan 2008 13:18:47 GMT (envelope-from phk@critter.freebsd.dk) To: "Igor Mozolevsky" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 07 Jan 2008 13:15:28 GMT." Date: Mon, 07 Jan 2008 13:18:47 +0000 Message-ID: <10319.1199711927@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Kostik Belousov , Peter Jeremy , 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: Mon, 07 Jan 2008 13:18:50 -0000 In message , "Igor Mozolevsky" writes: >On 07/01/2008, Poul-Henning Kamp wrote: >> In message <20080107095853.GR947@server.vk2pj.dyndns.org>, Peter Jeremy writes: >> >> >>This is a non-starter, if SIGDANGER is to have any effect, all >> >>processes that use malloc(3) should react to it. >> > >> >This depends on what SIGDANGER is supposed to indicate. IMO, a single >> >signal is inadequate - you need a "free memory is less than desirable, >> >please reduce memory use if possible" and one (or maybe several levels >> >of) "memory is really short, if you're not important, please die". >> >> That's what I have been advocating for the last 10 years... > >That makes the userland side of unnecessarily overcomplicated. Yes, but you will not see this complication, it will be hidden in the implementation of malloc(3). Every problem has a simple, easy to understand solution that does not work. SIGDANGER is one of these. It didn't work any good on AIX and it won't do so on FreeBSD either. The problem simply requires more than one bit of feedback information to get a sensible regulation. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.