Subject: Re: Performance Problem: malloc() is calling madvise()
To: None <firstname.lastname@example.org>
From: Perry E. Metzger <email@example.com>
Date: 05/20/2000 14:04:58
Jason R Thorpe <firstname.lastname@example.org> writes:
> On Sun, May 21, 2000 at 01:06:58AM +1000, Simon Burge wrote:
> > When the new malloc was introduced, it was noted that it handled memory
> > usage better and was faster too. That was when the madvise() call did
> > nothing...
> Actually, I'm pretty sure it was:
> New malloc is slower than the old malloc, but faster than GNU
> malloc, and has better memory usage than old malloc.
In general, you're never going to get much faster than a straight
power of two allocator PROVIDED you have infinite real
memory. However, if you use memory very inefficiently and start
swapping, you're screwed, too, so having efficient allocation often
speeds things up by just allowing you to live within the memory you
In some ways, it is a shame that we got rid of the old allocator
entirely -- it would have been nice to allow apps to explicitly select
using it in instances where it was known to work better.