r any help.
Balazs
I compile by:g++ -lpthread main.cpp
#include
void* myfunction( void* ptr ) {
int sum = 0;
for( int i = 0; i < 20; i++ )
sum *= i;
}
int main( int argc, char* argv[] ) {
pthread_t mythread;
pthread_create( &
Lothar Werzinger-2 wrote:
>
> balazs wrote:
>
>> Hi - I start a simple pthread and the program consumes about 10 Mbytes of
>> virtual memory. If I start 10 threads, it consumes 100 Mbytes.
>
> That's off topic, but the answer is that the default stack size
program just write zero to the standard error, which means that the
template parameter does not hide the class name. I have tested other
compilers, and they write one to the standard error. I do not know surely,
but I mean this a bug in gcc or a very strange behaviour of c++ standard.
Best, Balazs
cc result:
0
While icc, msvc result:
1
Best, Balazs
---