Threads problems
Threads problems
- Subject: Threads problems
- From: Matthew Jenkins <email@hidden>
- Date: Mon, 21 Feb 2005 17:28:54 +0000
Hi,
I am having "issues" with threads on darwin and memory consumption.
It seems that with every thread I create about 4k of resident memory is
allocated. That memory never seems to be reclaimed at thread
termination.
My little test program, which creates 100 threads at 5 second intervals
is posted below.
Is there something fundamental that I'm missing?
Cheers,
Matt
-- Darwin dannii.hq.inty.net 7.8.0 Darwin Kernel Version 7.8.0
#include <stdio.h>
#include <pthread.h>
void mythread()
{
printf("moo\n");
}
int main()
{
int i;
pthread_t q;
for(i=0; i<100; i++)
{
pthread_create(&q,NULL,(void *)&mythread,NULL);
sleep(5);
}
return(0);
}
Scanned for viruses by MailDefender
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden