Re: jemalloc to replace default allocator
Re: jemalloc to replace default allocator
- Subject: Re: jemalloc to replace default allocator
- From: David Leimbach <email@hidden>
- Date: Fri, 7 May 2010 07:37:33 -0700
On Fri, May 7, 2010 at 2:59 AM, Alastair Houghton
<email@hidden> wrote:
On 6 May 2010, at 22:51, Joel Reymont wrote:
> I would like to use jemalloc to replace the system memory allocator in Firefox.
Why do that? My understanding is that jemalloc's primary advantage is massive scalability for heavily threaded code. Firefox isn't *that* heavily threaded, right?
They already did that for linux and windows did they not? Mac OS X was the one platform left out of this optimization.
In any event, the system allocator on Mac OS X has always been pretty good, and it looks like the Snow Leopard version is already designed with per-processor "magazines" for small allocations.
Yeah Mac OS X's allocation scheme is optimized for threads already quite well, and this was necessary for GCD (libdispatch threading stuff) to work as well as it does. There's a lot of copying that has to go on for those blocks to work appropriately.
Personally, unless you have a really good justification for using jemalloc instead (and I'd argue that, for that, you need measurements showing that it's significantly faster than the system implementation), I'd stick with the system malloc. Not only does it mean that Firefox will get faster with every optimisation Apple makes to the system malloc, but it also means that all of the malloc debugging tools and so on will work with Firefox.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden