This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: i386 Dynamic Memory Allocation Error
- From: Andrew Lunn <andrew at lunn dot ch>
- To: juelo ersono <joel790917 at spray dot se>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 27 Nov 2003 08:52:24 +0100
- Subject: Re: [ECOS] i386 Dynamic Memory Allocation Error
- References: <1069916897031181@lycos-europe.com>
On Thu, Nov 27, 2003 at 08:08:17AM +0100, juelo ersono wrote:
> Hi,
>
> I'm using the i386 PC target with the all packages template (or net packages template). I have made no
> changes in the configuration except changing startup type to FLOPPY and turning on Asserts & Tracing
> option, and it seemes to work fine but I'm not able to allocate new memory. Take a look at this simple case:
>
> //////////////
> class Test
> {
> };
>
> int main(void)
> {
> new Test();
> return 0;
> }
> //////////////
>
> When running the program I get following assertion fault:
>
> ASSERT FAIL: <1>dlmalloc.cxx[767]void Cyg_Mempool_dlmalloc_Implementation::do_check_chunk()
> (cyg_uint8 *)p + sz <= (cyg_uint8 *)(((mbinptr)((char*)&(av_[2*(0) + 2] - 2*(sizeof
> (Cyg_Membool_dlmalloc_Implementation::Cyg_dlmalloc_size_t))))->fd)
I just run this on the synthetic target without problems.
To me it seems unlikely it is a problem with dlmalloc. More likely its
a heap problem.
Try running the test programs heaptest, dlmalloc[12] malloc[1-4].
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss