This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: malloc and threads
- From: Wolfram Gloger <Wolfram dot Gloger at dent dot med dot uni-muenchen dot de>
- To: tisson dot k dot mathew at intel dot com
- Cc: libc-alpha at sources dot redhat dot com
- Date: Wed, 27 Nov 2002 14:37:27 +0100 ("MET)
- Subject: Re: malloc and threads
- References: <288F9BF66CD9D5118DF400508B68C4460701D8A0@orsmsx113.jf.intel.com>
Hello,
> Here is the code; I'm running glibc 2.2.2 on XScale iq80320.
>
> --------------------------
> #define MYSIZE (1*1024)
> #define SLEEP_TIME (100*1000) // usec
>
> void *AllocThread(void *pvArg);
After adding
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
and compiling with -pthread, I am able to run this test successfully
for hours, on ix86 with glibc-2.2.5. Same on an old system with
glibc-2.1.3 on it.
Sorry, I have no idea what an "iq80320" is.
Regards,
Wolfram.