Re: New libc malloc patch

From: Jason Evans <jasone_at_canonware.com>
Date: Wed, 30 Nov 2005 23:20:43 -0800
On Nov 29, 2005, at 2:52 AM, Hiten Pandya wrote:
> I see that you have included an implementation of red-black tree CPP
> macros, but wouldn't it be better if you were to use the ones in
> <sys/tree.h> ?  I have only had a precursory look, but I would have
> thought that would be the way to go.

There's an updated patch available:

http://www.canonware.com/~jasone/jemalloc/jemalloc_20051201a.diff

This patch includes the following changes:

*) Use sys/tree.h rather than a separate red-black tree implementation.

*) Use the __isthreaded symbol to avoid locking for single-threaded  
programs, and to simplify malloc initialization.  The extra branches  
that are required to check __isthreaded should be more than offset by  
the removal of an atomic compare/swap operation.

*) Fix an obscure bug (very difficult to trigger without changing  
some compile-time constants).

Jason
Received on Thu Dec 01 2005 - 06:21:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:48 UTC