From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 18:32:41 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 BE93016A418 for ; Fri, 4 Jan 2008 18:32:41 +0000 (UTC) (envelope-from vadimnuclight@tpu.ru) Received: from relay1.tpu.ru (relay1.tpu.ru [213.183.112.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5ACCB13C457 for ; Fri, 4 Jan 2008 18:32:41 +0000 (UTC) (envelope-from vadimnuclight@tpu.ru) Received: from localhost (localhost.localdomain [127.0.0.1]) by relay1.tpu.ru (Postfix) with ESMTP id 565851046C1; Sat, 5 Jan 2008 00:32:38 +0600 (NOVT) X-Virus-Scanned: amavisd-new at tpu.ru Received: from relay1.tpu.ru ([127.0.0.1]) by localhost (relay1.tpu.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bHZ8UAgfyT8i; Sat, 5 Jan 2008 00:32:35 +0600 (NOVT) Received: from mail.main.tpu.ru (mail.main.tpu.ru [10.0.0.3]) by relay1.tpu.ru (Postfix) with ESMTP id 4E8E5104689; Sat, 5 Jan 2008 00:32:35 +0600 (NOVT) Received: from mail.tpu.ru ([213.183.112.105]) by mail.main.tpu.ru with Microsoft SMTPSVC(6.0.3790.3959); Sat, 5 Jan 2008 00:32:34 +0600 Received: from nuclight.avtf.net ([78.140.2.250]) by mail.tpu.ru over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Sat, 5 Jan 2008 00:32:21 +0600 Date: Sat, 05 Jan 2008 00:32:04 +0600 To: "Tim Kientzle" References: <477E6EB7.1010004@freebsd.org> From: "Vadim Goncharov" Organization: AVTF TPU Hostel Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <477E6EB7.1010004@freebsd.org> User-Agent: Opera M2/7.54 (Win32, build 3865) X-OriginalArrivalTime: 04 Jan 2008 18:32:21.0574 (UTC) FILETIME=[24C7FE60:01C84F00] X-Mailman-Approved-At: Fri, 04 Jan 2008 18:43:11 +0000 Cc: "freebsd-current@freebsd.org" Subject: Re: sbrk(2), OOM-killer and malloc() overcommit 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 18:32:41 -0000 04.01.08 @ 23:36 Tim Kientzle wrote: > Vadim Goncharov wrote: >> ... related "bug", in that of malloc overcommit,... > > malloc overcommit is not a bug; it's an important > feature for many applications, for the same > reasons that sparse files are an important feature. > (Many applications can optimize performance by > using an addressable region much larger than the > actual data they need to store.) What applications? How do they use this "feature"? > If you really need a 4G block of memory, mmap() > it to a file on disk. That's not a solution for end-user. Why just not have space reserving, as other operating systems can guarantee to their applications that stable availability of memory? -- WBR, Vadim Goncharov