Patch for the allocator.

Dhruv Matani dhruvbird@HotPOP.com
Tue Mar 23 14:57:00 GMT 2004


Hello,
	Here is a patch for the allocator. A few things were not up-to-date,
and some slow code was lying around. Got rid of that in lieu of builtin
functions.





-- 
	-Dhruv Matani.
http://www.geocities.com/dhruvbird/

Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html
-------------- next part --------------
2004-03-23  Dhruv Matani  <dhruvbird@gmx.net>
	
	* include/ext/bitmap_allocator.h: (_Bit_scan_forward) -> Made this
	function call __builtin_ctz instead of the while loop.
	(allocate) -> If condition has __builtin_expect.
	(deallocate) -> Ditto.
	Renamed a few left-over variables and typedefs according to the
	C++STYLE mentioned in the documentation.
	Protected calls to __gthread* by __gthread_active_p(), whose value
	is cached in the local variable __threads_active.
	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.dhruv.bitmap_allocator
Type: text/x-patch
Size: 24499 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040323/4bfc9bb1/attachment.bin>


More information about the Libstdc++ mailing list