malloc problem.

Andrew Lunn andrew@lunn.ch
Sat Oct 11 16:29:00 GMT 2003



On Sat, Oct 11, 2003 at 09:22:16AM -0700, Hadi Dewan wrote:
> Hi,
> I have a simple program that just malloc some memory.
> 
> Following are the steps I do 
> 
>  1. ecosconfig new leon
>  2. configtool 
>  3. Verify  under dynamic memory allocation node 
> everything is turn on.(Using Doug lea's malloc)
>  4. Compile my application code with ecos kernel
> library. In my application code I malloc some memory
> and printf "Hello world ". 
> 
> Now my system just crashes when I do "printf". However
> if I dont use malloc. My program is fine.
> 
> I used gdb to debug it further, I found "printf"
> crashs while doing some memcpy. 

First thing i would try is to enable assert.  I would then run some of
the test programs. tm_basic, dlmalloc[12] malloc[1234]. See if they
work correctly or fail.

     Andrew



More information about the Ecos-devel mailing list