brk() problem in glibc 2.3.2 on TQM860
Karim Yaghmour
karim at opersys.com
Wed Jun 30 14:01:07 EST 2004
... Pilot error ...
Karim Yaghmour wrote:
> I've been having problems with brk() calls (like ones made by malloc()
> to the
> kernel) when using glibc 2.3.2 on a TQM860 (16MB RAM, 8MB of flash.)
> Take the
> following snippet of code for example:
> for (i = 1, val = 10; i < 10; val = val * 10, i++) {
> printf("Allocating %lu \n", val);
> x = (void*) malloc(val);
> memset(x, '\0', val);
> }
It actually freezes in the memset() and the problem is the memset.S file in
glibc-2.3.2/sysdeps/powerpc/powerpc32/ which needs to be removed. I knew
this problem existed in older versions of glibc, but I had assumed that it
had been fixed in the newer versions ... I assumed wrong.
When the file is removed everything works fine.
Karim
--
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim at opersys.com || 1-866-677-4546
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list