This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
newlib newbie wants to malloc
- To: newlib at sourceware dot cygnus dot com
- Subject: newlib newbie wants to malloc
- From: Christian Groessler <chris at groessler dot org>
- Date: 09 Oct 2001 00:16:11 +0200
- Cc: cpg at aladdin dot de
Hi,
I'm trying to get newlib working on a new system and I've encountered
a problem.
There is a function _malloc_r used throughout the library, even malloc
simply calls _malloc_r.
This function is provided in the file newlib/libc/stdlib/mallocr.c.
There is a "#define mALLOc _malloc_r".
The problem is now that mALLOc() expects one parameter, but _malloc_r
is defined to get 2 parameters.
The first parameter to _malloc_r is a pointer which is now interpreted
by mALLOc as requested size.
How should this work? What am I doing wrong?
confused,
chris