Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jan 2003 10:31:21 -0800
From:      "David O'Brien" <dev-null@NUXI.com>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Virtual memory question
Message-ID:  <20030111183121.GA71528@dragon.nuxi.com>
In-Reply-To: <200301110200.h0B20rUC024725@arch20m.dellroad.org>
References:  <200301110200.h0B20rUC024725@arch20m.dellroad.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 10, 2003 at 06:00:53PM -0800, Archie Cobbs wrote:
> BTW this idea was spawned by this text in the sbrk(3) man page:
> 
>     The brk() and sbrk() functions are legacy interfaces from
>     before the advent of modern virtual memory management.
> 
> Along those lines, why does our malloc(3) library use sbrk(3) instead
> of mmap(), which would enable returning free pages back to the system
> more readily (since the pages would not have to be contiguous)?

See the glibc malloc(3) [which started with libdlmalloc] or the
libdlmalloc port.  It uses the heap (sbrk(3)) for small allocations, and
mmap() for larger ones.  The threashold is tunable.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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