This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mt_allocator issues.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]