From owner-freebsd-hackers Mon Sep 30 03:39:56 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA10043 for hackers-outgoing; Mon, 30 Sep 1996 03:39:56 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id DAA09942 for ; Mon, 30 Sep 1996 03:39:49 -0700 (PDT) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id BAA19828 for ; Mon, 30 Sep 1996 01:33:50 -0700 (PDT) Received: from ocean.campus.luth.se by mail.crl.com with SMTP id AA09630 (5.65c/IDA-1.5 for ); Mon, 30 Sep 1996 01:32:57 -0700 Received: (from karpen@localhost) by ocean.campus.luth.se (8.7.5/8.7.3) id KAA18915 for hackers@FreeBSD.org; Mon, 30 Sep 1996 10:33:15 +0200 (MET DST) From: Mikael Karpberg Message-Id: <199609300833.KAA18915@ocean.campus.luth.se> Subject: Re: Optimizing bzero() To: hackers@FreeBSD.ORG Date: Mon, 30 Sep 1996 10:33:14 +0200 (MET DST) In-Reply-To: <1795.843631197@critter.tfs.com> from Poul-Henning Kamp at "Sep 25, 96 07:59:57 am" X-Mailer: ELM [version 2.4ME+ PL22 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to Poul-Henning Kamp: > In message <199609250343.AA109333032@fakir.india.hp.com>, A JOSEPH KOSHY writes > : > >>>>> "phk" == "Poul-Henning Kamp" writes > > > >phk> The next thing you could start to consider is when people realloc a > >phk> multipage allocation to something bigger, it would be nice to be able > >phk> to ask the kernel to "move these pages to this address" and then extend > >phk> It there instead of copying the contents. > > > >Makes sense; can this be done without major surgery though? How costly > >would it be for malloc(3) to invoke a system call to re-arrange the > >address space compared to an memory allocation followed by a bcopy()? > cheap(er). Can't you just make realloc do that? Is there a problem with doing it? If not, is there a way to tell the system to rearrange your address space? [stuff deleted] /Mikael