2006-11-08から1日間の記事一覧

GCC (libstdc++) 付属の STL をマルチスレッド環境で使うにはどういう設定が要るんでしょうか?という基本的な疑問

あったあった. When you link a multithreaded application, you will probably need to add a library or flag to g++. This is a very non-standardized area of GCC across ports. Some ports support a special flag (the spelling isn't even standard…

Boost.Pool

#include <cstddef> #include <list> #include <iostream> #include <boost/pool/pool_alloc.hpp> #include <boost/timer.hpp> int main() { int const n = 10000000; boost::timer t; double d = 0.0; { std::list< int, ***** ここを色々取り替える ***** > l; for( int i = 0; i < n; ++i ){ l.push_back( 42 ); //l.p</boost/timer.hpp></boost/pool/pool_alloc.hpp></iostream></list></cstddef>…