From: najay on
This may be too late to help the original poster, but I just came across
the same issue. The problem was that sbrk was called before malloc_init, so
sbrk had null pointers for beginning and end of heap memory.

george

>> Does it always return 0x00000008 regardless of how many times you've
>> called malloc, or regardless of how much you've asked for? =A0The
former
>> would be a problem; the latter is only a problem if that's not where
>> you're supposed to be allocating heap. =A0Since I'm not terribly
familiar
>> with the ARM, I don't know if there's a problem with having heap memory
>> at 0x00000008.
>>
>> I would expect most malloc routines to return the same address on the
>> very first call, to me that's normal behavior.
>>
>> --
>> Tim Wescott
>> Control systems and communications
consultinghttp://www.wescottdesign.com
>>
>> Need to learn how to apply control theory in your embedded system?
>> "Applied Control Theory for Embedded Systems" by Tim Wescott
>> Elsevier/Newnes,http://www.wescottdesign.com/actfes/actfes.html- Ocultar
t=
>exto de la cita -
>>
>> - Mostrar texto de la cita -
>
>Hello Tim, thanks for showing up.
>
>Yes: we have a problem here. It returns 0x00000008 regardless of how
>many times I call malloc and how much I ask for. It _always_ returns
>0x00000008.
>
>I guess it has to do with the linker file, but I am not so much of a
>master with them to find out what has to be fixed.
>
>Any help is appreciated.
>
>Thanks.




---------------------------------------
This message was sent using the comp.arch.embedded web interface on
http://www.EmbeddedRelated.com