Subject: Re: memory (re-)allocation woes
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Joerg Sonnenberger <firstname.lastname@example.org>
Date: 11/29/2004 14:30:17
On Mon, Nov 29, 2004 at 01:15:43AM +0100, theo borm wrote:
[skip troll-like ranting over flaws of NetBSD]
> well... I'll start thinking about how to make reallocs less wastefull of
> resources; in view of its current implementation performance (memcpy,
> eventually leading to excessive swapping) can hardly be considered an
> issue..... I guess I have some serious reading up to do. Can anyone give me
> a hint if there is a portable (architecture wise) way to remap pages from a
> user program?
There is no portable way to remap pages created via MAP_ANON. That is the
fundamental reason why realloc can't just shove the pages around and be
done. Basically, it does implement what you call "an algorithm without
support from the hardware VM".