phk malloc, was (Re: ptmalloc2)

Ted Unangst tedu at zeitbombe.org
Wed Feb 23 00:06:16 PST 2005


On Thu, 17 Feb 2005, Jonathan Dama wrote:

Ideally, you ought to be able to fill malloc's backing keg
with allocations from mmap permitting MAXDSIZ to be left
alone.  (phk reports that mmap is x5 slower than brk--see:
http://lists.swelltech.com/pipermail/squid-users-archive/1996-August/000666.html
http://lists.swelltech.com/pipermail/squid-users-archive/1996-August/000663.html
--but this could be made up by simply going to the kernel
less frequently--see further:)
in the real world, the slowdown is more like 10% for something like 
buildworld.  not great, but not crippling like 500% would be.

Moreover, it may even brk for every additional 4K of
allocation via malloc.
if you allocate 4k at a time, yes it does.

--
we don't run washington and no one really does




More information about the Kernel mailing list