tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Franc Carter <franc () mml ! usyd ! edu ! au>
To: tru64-unix-managers
Subject: pthread_create_problem
Date: Wed, 22 Mar 2000 23:06:38 +0000	[thread overview]
Message-ID: <96079341819698.tru64-unix-managers.marc@archive.invalid> (raw)


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

                 reply	other threads:[~2000-03-22 23:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox