Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2005 10:36:25 +0100
From:      Uwe Doering <gemini@geminix.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: malloc vs ptmalloc2
Message-ID:  <42107119.5060700@geminix.org>
In-Reply-To: <1108349803l.26586l.0l@BARTON>
References:  <1108277558l.86500l.0l@BARTON> <20050213082128.GA68307@VARK.MIT.EDU> <1108349803l.26586l.0l@BARTON>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason Henson wrote:
> On 02/13/05 03:21:29, David Schultz wrote:
>> [...]
>> With a little bit of work, you should be able to replace
>> src/lib/libc/stdlib/malloc.c.  ptmalloc is much more heavyweight,
>> but it would probably do better in cases where you have a large
>> number of threads doing a massive number of malloc/free operations
>> on a multiprocessor system.  Other than that, I don't know enough
>> details about ptmalloc to speculate, except to say that for most
>> real-world workloads on modern systems, the impact of the malloc
>> implementation is likely to be negligible.  Of course, test
>> results would be interesting...
> 
> I see what you mean by heavy weight!  Looking through the sources.  The  
> gains looked promising in this thread
> http://docs.freebsd.org/cgi/mid.cgi?420BB1FF.11156.68F6CEC
> 
> I might find the time for it, and if I do I hope it is not too  difficult.

Just from memory, doesn't Linux' malloc require kernel support for 
re-mapping memory regions, which is not available in FreeBSD?  This 
issue came up in the discussion about FreeBSD's anemic realloc 
performance.  Or has this kernel functionality been added to recent 
versions of FreeBSD?

You may want to investigate this before you invest too much time into 
your porting effort.

    Uwe
-- 
Uwe Doering         |  EscapeBox - Managed On-Demand UNIX Servers
gemini@geminix.org  |  http://www.escapebox.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42107119.5060700>