From owner-freebsd-arch Sat Jan 11 10:32:55 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A926337B401 for ; Sat, 11 Jan 2003 10:32:54 -0800 (PST) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33EE743E4A for ; Sat, 11 Jan 2003 10:32:54 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.6/8.12.2) with ESMTP id h0BIWdR6071765; Sat, 11 Jan 2003 10:32:44 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.6/8.12.6/Submit) id h0BIVMre071752; Sat, 11 Jan 2003 10:31:22 -0800 (PST) Date: Sat, 11 Jan 2003 10:31:21 -0800 From: "David O'Brien" To: Archie Cobbs Cc: freebsd-arch@freebsd.org Subject: Re: Virtual memory question Message-ID: <20030111183121.GA71528@dragon.nuxi.com> Reply-To: freebsd-arch@freebsd.org References: <200301110200.h0B20rUC024725@arch20m.dellroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200301110200.h0B20rUC024725@arch20m.dellroad.org> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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