Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jan 2008 09:36:55 -0800
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Vadim Goncharov <vadimnuclight@tpu.ru>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: sbrk(2), OOM-killer and malloc() overcommit
Message-ID:  <477E6EB7.1010004@freebsd.org>
In-Reply-To: <opt4euzyj44fjv08@nuclight.avtf.net>
References:  <opt4euzyj44fjv08@nuclight.avtf.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?477E6EB7.1010004>