From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 18:10:23 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 DD8A916A419 for ; Fri, 4 Jan 2008 18:10:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id B652813C448 for ; Fri, 4 Jan 2008 18:10:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.12.9/8.12.9) id m04HatJu003934; Fri, 4 Jan 2008 09:36:55 -0800 (PST) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.209] (p54.kientzle.com [66.166.149.54]) by kientzle.com with SMTP; Fri, 04 Jan 2008 09:36:55 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <477E6EB7.1010004@freebsd.org> Date: Fri, 04 Jan 2008 09:36:55 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Vadim Goncharov References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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:10:24 -0000 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.) If you really need a 4G block of memory, mmap() it to a file on disk. Tim Kientzle