[ECOS] i386 Dynamic Memory Allocation Error

juelo ersono joel790917@spray.se
Thu Nov 27 07:08:00 GMT 2003


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 took a look at dlmalloc.cxx row 767 and got the information that this error only occurs when the
application has trashed the memory or if there are any coding errors in malloc. The simple program above
should not trash the memory, so I'll guess that there is a coding error?

Note that I have no problems with allocating memory at all using the i386 PC target with the default
packages template. Also I have tried this application on several different PC's and get the same error on all
of them.

Does anyone have any idea of why I get this error?

/Joel

____________________________________________________________
  Vad står det om dig på nätet? - http://www.lycos.se/


-------------- next part --------------
-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


More information about the Ecos-discuss mailing list