A
Abhi
I am trying to use pthread_allocator for a multi-threaded code.
However it does not seem to compile.
Heres the code snippet:
#include <list>
#include <bits/pthread_allocimpl.h>
using namespace std;
int main(int argc, char* argv[] )
{
std::list<int, std:thread_allocator<int> > List;
for ( int i=0; i<100000; ++i )
List.push_back( int() );
}
The version of g++ is
Configured with: ../gcc-3.0.4/configure
--prefix=/prj/qisdcrm/QChat/gcc-3.0.4-Linux --enable-threads
Thread model: posix
gcc version 3.0.4
Guess I am doing something gravely wrong!
Thanks
......Abhi
However it does not seem to compile.
Heres the code snippet:
#include <list>
#include <bits/pthread_allocimpl.h>
using namespace std;
int main(int argc, char* argv[] )
{
std::list<int, std:thread_allocator<int> > List;
for ( int i=0; i<100000; ++i )
List.push_back( int() );
}
The version of g++ is
....g++ -v
Configured with: ../gcc-3.0.4/configure
--prefix=/prj/qisdcrm/QChat/gcc-3.0.4-Linux --enable-threads
Thread model: posix
gcc version 3.0.4
Guess I am doing something gravely wrong!
Thanks
......Abhi