From owner-freebsd-current Thu Mar 14 1:53:53 2002 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (esplanaden.cybercity.dk [212.242.40.114]) by hub.freebsd.org (Postfix) with ESMTP id 00BFB37B400 for ; Thu, 14 Mar 2002 01:53:51 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g2E9raSr000842; Thu, 14 Mar 2002 10:53:40 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Alfred Perlstein Cc: David Greenman , John Indra , freebsd-current@FreeBSD.ORG Subject: Re: malloc() and the stock Perl in -CURRENT (and -STABLE) In-Reply-To: Your message of "Thu, 14 Mar 2002 01:28:47 PST." <20020314092847.GL74829@elvis.mu.org> Date: Thu, 14 Mar 2002 10:53:36 +0100 Message-ID: <841.1016099616@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020314092847.GL74829@elvis.mu.org>, Alfred Perlstein writes: >* Poul-Henning Kamp [020313 22:43] wrote: >> >> But if somebody wants to try to code this optimization, I'll be more >> than happy to review the result. I just don't expect it to do much >> in "real-life" as opposed to "silly benchmark" situations. > >Have you thought about issuing a madvise(MADV_WILLNEED) after the >brk/mmap call in malloc, at least doing it when it's called via >realloc, this might get rid of the superfolous (sp?) page faults >that David Greenman reported. It would be much more valuable to add a mremap(void *from, void *to, size_t length); since that can _solve_ the problem in _all_ cases, rather than add more or less byzantine workarounds for silly benchmarks. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message