This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: malloc problem.
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Hadi Dewan <hadi_dewan at yahoo dot com>
- Cc: ecos-devel at sources dot redhat dot com
- Date: Sat, 11 Oct 2003 18:29:13 +0200
- Subject: Re: malloc problem.
- References: <20031011162216.84721.qmail@web13002.mail.yahoo.com>
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