mt_allocator issues.

Dhruv Matani dhruvbird@gmx.net
Tue Mar 16 06:27:00 GMT 2004


On Mon, 2004-03-15 at 14:23, Stefan Olsson wrote:

> Comments are greatly appriciated! I intend to address this, the "atomic" 
> issue and maybe also a change of name within the next couple of days.

As I currently see, you might have to protect the reads in the
deallocation function too when calcultaing the removal of blocks from
the current thread's to the global pool.

Optimization: Currently, in the deallocate function we are removing one
block and individually adding it to the global list, instead, we could
'splice' a range of blocks to the global pool using just one operation
on the global pool's first pointer. This would further reduce lock
contention, because while traversing the list, there would be no need to
hold the lock.



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

Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html



More information about the Libstdc++ mailing list