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: Memory allocation failure


On Fri, May 06, 2005 at 06:57:19AM -0700, David Brennan wrote:
> I have created two different applications with the same eCos 
> configuration and essentially the same code base. One trivial 
> application which is missing most of the meat of the main application. 
> The trivial application runs fine. However when I try and start the real 
> application, it dies during my static constructors. I have traced the 
> problem down to a malloc call, but GDB eventually hangs while trying to 
> single step through there. It always hangs at this one particular 
> malloc, when constructing one particular instantiation of a class. Any 
> ideas? Is there a fixed number of pool elements which can be allocated 
> using dlmalloc?
> Target is i386 VME based PC.

A total guess.....

You say this is a constructor. When is the constructor called? Is it a
static constructor which will be called early during startup? Have you
checked that malloc's constructor has already been called so that
malloc itself is read to be called?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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