Date: Thu, 14 Mar 2002 02:03:03 -0800 From: Alfred Perlstein <bright@mu.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: David Greenman <dg@root.com>, John Indra <maverick@office.naver.co.id>, freebsd-current@FreeBSD.ORG Subject: Re: malloc() and the stock Perl in -CURRENT (and -STABLE) Message-ID: <20020314100303.GM74829@elvis.mu.org> In-Reply-To: <841.1016099616@critter.freebsd.dk> References: <20020314092847.GL74829@elvis.mu.org> <841.1016099616@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
* Poul-Henning Kamp <phk@critter.freebsd.dk> [020314 01:53] wrote: > In message <20020314092847.GL74829@elvis.mu.org>, Alfred Perlstein writes: > > > >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. You're right that it would be a better optimization, however it's much more code to write than simply passing a flag down to the code responsible for the allocation especially when you _know_ you'll need it. I may be wrong about MADV_WILLNEED making any difference anyhow. :) -- -Alfred Perlstein [alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020314100303.GM74829>