ext/mt_alloc.h

Stefan Olsson stefan@snon.net
Tue May 20 09:49:00 GMT 2003


Hi everyone!

My and Ola's FSF assignments are now near completion (we have sent back 
signed assignment papers last week). As per the previous discussion here 
on the list we have prepared a new version of the __mt_alloc allocator 
in a separate file ext/mt_alloc.h as well as taken care of a bug (that 
showed up in consumer/producer environment), optimized bin lookup and 
added some rough out-of-memory handling.

Attached you will also find the revised testprograms.

There are a couple of "unknowns" for us:
- There are quite a few different #ifndef naming conventions in use - 
which one should this file use (we chose __GLIBCPP_MT_ALLOC_H)?
- Currently we include stl_alloc.h in this file since all the other 
"SGI-style" allocators have defined a set of alloc_traits thingies - is 
this needed? If not it would suffice with stl_threads.h and functexcept.h?
- Which namespace should this code live in?

Also note that (as mentioned in the original posting 
http://gcc.gnu.org/ml/libstdc++/2003-03/msg00033.html) this allocator 
will currently only work on platforms using the pthread_* since there is 
no __gthread_mutex_init () call in gthr.h (we use pthread_mutex_init () 
directly!).

Brgds

/Stefan & Ola

-- 
A real person has two reasons for doing anything... 
...a good reason and the real reason.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mt_alloc.h
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030520/01e1ced5/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alloc_perf_comp_mt.cc
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030520/01e1ced5/attachment.cc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alloc_perf_comp_single.cc
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030520/01e1ced5/attachment-0001.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4634 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030520/01e1ced5/attachment.bin>


More information about the Libstdc++ mailing list