[extropy-chat] Optimal computer configurations [Was: Commentary: Does Karl Schroeder's opinion reallymatter?]
Samantha Atkins
sjatkins at mac.com
Wed May 3 21:09:39 UTC 2006
On May 3, 2006, at 12:54 PM, Robert Bradbury wrote:
>
> With regard to memory management the problem is being caught
> between a rock and a hard place with efficiency vs. portability.
> You want to have very different memory management strategies for
> history records, bookmarks, scripts, HTML text, images, sound &|
> video, etc. You will not get that if they all go into a single
> heap managed by the ANSI C portable functions (malloc() and free
> ()). I believe there is some tuning you could do with GNU's libc
> implementation of these (under Linux) but that isn't going to buy
> you squat on Windows. You could also rewrite the Linux VM manager
> to better handle cases of heap thrashing (but again that doesn't do
> squat for Windows). You have to bear in mind that it probably took
> a decade until Linux became robust enough that it could scale from
> the largest machines (supercomputers) to the smallest (routers &
> hand-held devices) and everything in between and adapt relatively
> well to most of that hardware.
>
What I suggested is quite portable and has been used for many years
on a variety of projects and platforms. Allocate large blocks using
the underlying system/libc calls. Write alloc, free, etc.
substitutes and any more specialized calls you might desire that
suballocate from these large blocks with sufficient additional
bookkeeping, tagging and such to more efficiently clean up garbage
and compact the heap. This sort of thing has been written many
times. Its main drawback is the larger memory increment when the
current large blocks cannot satisfy a request. But with compacting
of the heap large blocks themselves may be released if memory needs
go down significantly enough.
- samantha
More information about the extropy-chat
mailing list