From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6d1c117df8d6a6e7,start X-Google-Attributes: gidfee84,public From: root Subject: pthread_create and memory limits Date: 1998/03/16 Message-ID: <6ejr56$3k3@senator-bedfellow.MIT.EDU>#1/1 X-Deja-AN: 334632318 Keywords: pthreads, ulimit Organization: Massachvsetts Institvte of Technology Newsgroups: comp.unix.osf.osf1 The following code terminates on DU 4.0B with an ENOMEM in pthread_create after generating 7 threads #include #include #define MB 1048576 void * do_something(void* ptr) { sleep(2); return 0; } int main(int argc, char** argv) { const int nthreads = 8; int i; pthread_t* pthrd = new pthread_t[nthreads]; char* buf = new char[140*MB]; for( i=0; i