This is the mail archive of the ecos-discuss@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: i386 Dynamic Memory Allocation Error


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


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