sbrk(2), OOM-killer and malloc() overcommit

Tim Kientzle kientzle at freebsd.org
Fri Jan 4 10:10:24 PST 2008


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


More information about the freebsd-current mailing list