* pthread_create_problem
@ 2000-03-22 23:06 Franc Carter
0 siblings, 0 replies; only message in thread
From: Franc Carter @ 2000-03-22 23:06 UTC (permalink / raw)
To: tru64-unix-managers
We are having a problem with pthread_create(). Thread
creation fails if we try to create a thread when we the
process is bigger than about 512M. The vm-mapentries
on the machine is set to 32768. The machine has 2GB
of ram.
An example piece of code that fails is below.
Any suggestions and/or an explanation of how vm-mapentries
affects the system would be appreicated.
thanks
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
void *test (void *arg)
{
return NULL;
}
int main ()
{
pthread_t thread;
int i;
assert (malloc (512*1024*1024));
i =3D pthread_create (&thread, NULL, test, NULL);
if (i=3D=3DENOMEM) printf ("Out of memory\n");
return i;
}
--=20
Franc Carter MEMLab, University of Sydney
Ph: 61-2-9351-7819 Fax: 9351-6461
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-03-22 23:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-22 23:06 pthread_create_problem Franc Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox