From owner-freebsd-current Tue Aug 27 10:44:00 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA17213 for current-outgoing; Tue, 27 Aug 1996 10:44:00 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA17189 for ; Tue, 27 Aug 1996 10:43:50 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id MAA00794; Tue, 27 Aug 1996 12:34:40 -0500 (EST) From: "John S. Dyson" Message-Id: <199608271734.MAA00794@dyson.iquest.net> Subject: Re: FreeBSD malloc.c, -lmalloc, and squid. To: terry@lambert.org (Terry Lambert) Date: Tue, 27 Aug 1996 12:34:40 -0500 (EST) Cc: stesin@gu.kiev.ua, angio@aros.net, squid-users@nlanr.net, current@FreeBSD.org In-Reply-To: <199608271653.JAA24972@phaeton.artisoft.com> from "Terry Lambert" at Aug 27, 96 09:53:42 am Reply-To: dyson@FreeBSD.org X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > Secondly, the sbrk()-based system recovery of memory assumes too > much allocation locality: the recovery of memory (via sbrk() back > to the system) can only occur at the end of the allocation region. > Actually, we have an madvise(2) in current that supports "freeing" pages, but keeping the VM space. That doesn't do EXACTLY what you say above, but it can help. I have been running with an augmented version of phkmalloc with that change for a long time now. > > I would like to see an extention to the mmap() semantics for sparse > reclaimation on a per-page basis: When a full page is no longer on > use, it would be returned individually to the system. > You can do an munmap that does not correspond directly to an mmap. Also, as I said above, we have an madvise(2) call (arg:MADV_FREE) that releases the page, without giving up the vm space. Specifically, the page is marked clean, and might/might-not be demand-zeroed the next time that you use it. John