This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc problem.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]