malloc always returns null

Duane Ellis duane-gcc-help@duaneellis.com
Sun Jul 20 23:05:00 GMT 2008


Ted Phares wrote:
>> You do not state what you are using as your "standard C library". I 
>> assume "newlib" it is the most common embedded C library.
>
> I'm actually not sure.  I'm using binaries compiled by the vendor that 
> supplied the hardware debug tool & development environment for my 
> target system.

Hm.. You paid for your GCC eh? 

You then probably paid for support from your GCC vendor. You should ask 
your vendor for the support you paid for.

But To answer your question - you do not give enough information.  You 
might go digging through the header files - looking at copyright 
statements. The key file you are looking for is "reent.h" - it is some 
what of a tell tail sign you are using newlib. Compare the copyright 
statements and the files with those in newlib.

Otherwise - you'll need to find the source to the library you are using 
so you debug your problem. Or - resort to disassembly :-( yuck

Your vendor who wants your business, or has your money should be able to 
help.

-Duane.



More information about the Gcc-help mailing list